io,进程监控

写在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
原文地址:https://www.cnblogs.com/tomatoes-/p/9675525.html