The use of shell script AB every 30 minutes concurrent, 10 minutes rest


1、 The script is as follows:

Echo "program starts!"
Echo "the program stops every 15 minutes and takes a 10 minute break"
while true
 Echo "this cycle begins to execute! This concurrent test is 30 minutes! "
 ab -n 738100 -c 410
 Echo "take a 10 minute break at the end of this round of test!"
 sleep 10m
Echo "program test finished! "

2、 Use shell scripts to monitor the process and restart it if it stops

Echo "start abtest program!"
while [ 1 ] ; do
 echo "  The program has been restarted“
 sleep 10s
 result=`pidof -x
 if [ -z "$result" ];then
 echo "process is finished"
 echo " Program hung, please restart! "


The above is the use of shell script introduced by Xiaobian to you. AB takes a 10 minute break every 30 minutes. I hope it will be helpful to you. If you have any questions, please leave me a message, and the editor will reply you in time. Thank you very much for your support to the developeppaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!