监控ntp进程的

!#/bin/bash
ntp_num=$[`ps -ef|grep ntp|wc -l`-1]
if [ $ntp_num == 1 ];then
echo 0
else
echo $ntp_num
fi
posted @ 2019-09-22 19:30  π=3.1415926  阅读(230)  评论(0编辑  收藏  举报