... PID=`cat /var/log/syslogd.pid` RUNNING=`ps -ef | grep -v grep | grep $PID | wc -l` if [ $RUNNING != 1 ] then echo "syslog not running" fi ...