Question on ps

From: Christopher Knorr (cknorr@trapsystems.com)
Date: Fri Dec 09 2005 - 12:57:43 EST


We have a simple shell monitoring script that runs out of cron every 5
minutes. It does a 'ps -e' and then grep's to see if the process is
running. If it's not, a pager goes off to alert an operator.

99.99% of the time it works fine, but every so often we get a 'false
positive', and I now know why. Normally the "ps" output for the process
will appear as:

1481 pts/5 I + 02:43:33 vlink_preparation.tcl

However, this morning when we received a false positive, the "ps" output
looked like this:

1481 pts/5 R + 02:38:19 [vlink_preparatio]

This caused my script to be unhappy, because it's greping for the full
process name.

If anyone knows what the brackets mean, and why it truncates the name, I
would be appreciative!!!

Much thanks,

Chris



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:26 EDT