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.
Corn Job to stop running all lab's Nodes
Moderator: mike
-
- Posts: 4
- Joined: Thu May 04, 2017 1:52 pm
Re: Corn Job to stop running all lab's Nodes
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
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
-
- Posts: 4
- Joined: Thu May 04, 2017 1:52 pm
Re: Corn Job to stop running all lab's Nodes
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.
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.
-
- Posts: 533
- Joined: Wed Mar 15, 2017 1:54 pm
Re: Corn Job to stop running all lab's Nodes
did you try /opt/unetlab/wrappers/unl_wrapper -a stopall ?
E.
E.