systat problem / solution?

Date: Fri, 6 Dec 1996 17:13:08 -0400
From: Landon Boyd <landon@chebucto.ns.ca>
To: David Trueman <david@chebucto.ns.ca>, csuite-tech@chebucto.ns.ca
Precedence: bulk

next message in archive
next message in thread
previous message in archive
Index of Subjects



systat currently has some portability problems.  These are:

if [ `ps uaxw | egrep 'syslogd|inetd|router|scheduler|smtpserver' | wc -l` 
-lt 6 ] || [ `ps uaxw | egrep httpd | wc -l` -lt 1 ]; then
        echo "Some important system processes are not running!"
        status=`expr $status + 1`
fi

Could we change this to

fields=`echo $SYSPROC|gawk -F'|' '{print NF}'`
if [ `ps uaxw | egrep $SYSPROC | wc -l` -lt fields ] ; then
	echo "Some important system processes are not running!"
	status=`expr $status + 1`
fi

Where $SYSPROC would be set up in vars to be a '|' separated list of
important system processes.





==================================================================
Landon Boyd                          landon@chebucto.ns.ca
Distribution Support Technician,     http://chebucto.ns.ca/~landon
Chebucto Community Net               902-455-4099hm 902-494-2449wk
==================================================================



next message in archive
next message in thread
previous message in archive
Index of Subjects