Hi All
This is my first posting on tek-tip. Ok here's the problem
I'd like check for long running processes using the ps command but I'm not sure if I'm attacking this the right way or should I use Perl instead?
script:
logdir=/usr/local/logs
lg=30:00 test="`ps aux|grep [P]SAPPSRV | awk '{print $10}'`"
for i in $test do
if [[ $test -gt $lg ]]
then
echo "There is a long process"
else
echo "NO LONG RUNNING PROCESS"
fi
done
Any help would be great
thanks
James
This is my first posting on tek-tip. Ok here's the problem
I'd like check for long running processes using the ps command but I'm not sure if I'm attacking this the right way or should I use Perl instead?
script:
logdir=/usr/local/logs
lg=30:00 test="`ps aux|grep [P]SAPPSRV | awk '{print $10}'`"
for i in $test do
if [[ $test -gt $lg ]]
then
echo "There is a long process"
else
echo "NO LONG RUNNING PROCESS"
fi
done
Any help would be great
thanks
James