Page 1 of 1
Corn Job to stop running all lab's Nodes
Posted: Fri Jul 12, 2019 8:15 am
by prasath1017
I have provisioned community edition and provided multiple user PODs. This is killing my server resources when the lab is left running and idle.
Could you pleaes help me with a simple script on eve-ng community version using to stop all idle nodes using "script / Cron tab" to kill all idle nodes.
Re: Corn Job to stop running all lab's Nodes
Posted: Tue Jul 16, 2019 9:34 am
by prasath1017
Hi,
I am running crontab everyday to reboot the VM for now.
0 0 * * * root /sbin/shutdown -r now # reboot every day at 00:00 am
Will explore to identify how to kill "dynamips", "qemu" and other nodes. If anyone has tried it, please share your thoughts
Re: Corn Job to stop running all lab's Nodes
Posted: Tue Jul 16, 2019 12:35 pm
by prasath1017
I have tested the below and it works for my requirement.
Add the below cron job to kill the process with the pattern of any qemu, iol and dynamips.
edit the /etc/crontab
0 3 * * * root pkill qemu
0 3 * * * root pkill iol
0 3 * * * root pkill dynamips
The above will stop all nodes from any lab at 3am everyday.
Re: Corn Job to stop running all lab's Nodes
Posted: Wed Jul 17, 2019 5:23 pm
by ecze
did you try /opt/unetlab/wrappers/unl_wrapper -a stopall ?
E.