#!/bin/sh # Add the name of any new processes to be checked in the PROCLIST. It should # be displayed when executing either "netstat -a" or "ps ax" output. # You might have to edit /etc/services to include netstat processes without # a name. PROCLIST=" update syslogd klogd inetd crond lpd gpm postfix sendmail httpd smbd nmbd sshd telnetd ftpd mysqld " echo -e "\fVerifying services...\f" for EACH in $PROCLIST ; do EVENED=`echo "$EACH " | cut -c -10` netstat -a | grep -c $EACH >/dev/null ||\ ps ax | grep -v echo | grep -v grep | grep -c $EACH >/dev/null && \ echo " $EVENED [ OK ] " || \ echo " $EVENED [ OFF ] " done echo