crontab
#!/bin/bash step=$1 for (( i = 0; i < 600000; i=(i+step) )); do date +%Y%m%d‘ ‘%H:%M:%S >>/home/xiluhua/procNum.txt printf " " ps -ef|grep memcached | grep 11211 >> /home/xiluhua/procNum.txt printf "\n" >> /home/xiluhua/procNum.txt sleep $step done
时间: 2024-10-05 22:44:19