Systems Management (OpenView-OP Mgmt) Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Monitor process older than

Advisor

Monitor process older than

Hello,

 

I'm looking to monitor (on an HP-UX agent) if a specific process is older then 5 days. "ps -ef | grep "process" " of course gives me the details of the process but is there an easy way to monitor the date comparing it to the actual date to generate a critical alarm if the process has been running for over 5 days?

 

Regards

1 REPLY
Highlighted
Honored Contributor [Founder]

Re: Monitor process older than

Hello.

 

You can write yourself a little tool using pstat(2) interface (in particular, pstat_getproc()) - the check would be rather trivial since it returns start time in seconds since epoch. Alternatively, there are various date parsing libraries/modules out there that can be used (I've used several Perl modules in the past).

 

Regards,

    Goran