I'm trying to stress test several servers that I can ssh into. I'm trying to write a python script that causes a reboot loop for N times. I call
os.system('reboot')
But, I'm not sure how to have the script continue execution once the server has finished booting to continue execution. The servers do run various distros of Linux. Any help would be great.
You mentioned that the solution doesn't have to be in Python, so you can just use a Bash script for this (given that you can ping the server):
Save it in something like
command_runner.sh
and simply call it via./command_runner.sh 2 server.example.org
on a workstation that can SSH and run reboot on the server.