|
From: Murray B. <hq-...@hy...> - 2007-03-29 04:17:41
|
I tried explicitly setting the return code but it still shows as unavailable. However a scripting guru I am not. The script I'm running is:
#!/bin/sh
hostname=`hostname`
for w in https-www-test
do
pids=`ps -ef | grep $w | grep webservd | grep -v wdog | awk '{print $2}'`
net=0
for pid in $pids
do
cd /proc/$pid/fd
count=`ls| wc -l | sed 's/ //g'`
net=`expr $net + $count`
done
echo "$net"
done
exit 0
When I run it manually it looks like:
ecsydtst03$ ./filedescriptors.sh
359
ecsydtst03$
There are some superfluous bits in here because it has been roughly cut down for the purposes of testing.
Thanks . . . Murray
|