posts - 126,comments - 1,trackbacks - 0

写在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 阅读(...) 评论(...) 编辑 收藏