写在shell脚本中,每5秒执行一次

#!/bin/bash
while true
do
        echo '========================'`date +%Y%m%d_%T` >> iostat_monitor.log
    iostat -x -m >> iostat_monitor.log
    ps -ef |grep /usr/bin/ssh  |grep 15:01 | grep -v grep |wc -l
    sleep 5
done

 

posted on 2018-09-19 17:02  Tomatoes  阅读(159)  评论(0编辑  收藏  举报