[Nagiosplug-help] R: check_procs
Baker, Charles H.
cbaker at nuvox.com
Thu Oct 29 15:39:45 CET 2009
Well, on linux you can get a couple of columns useful to your need from the ps command. They are:
lstart STARTEDtime the command started.
And
etime ELAPSEDelapsed time since the process was started, in the
form [[dd-]hh:]mm:ss.
For example
cbaker at rain:~$ ps -Ao lstart,etime,comm
STARTED ELAPSED COMMAND
Wed Oct 28 17:22:55 2009 17:12:33 init
Wed Oct 28 17:22:55 2009 17:12:33 kthreadd
Wed Oct 28 17:22:55 2009 17:12:33 migration/0
Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/0
Wed Oct 28 17:22:55 2009 17:12:33 watchdog/0
Wed Oct 28 17:22:55 2009 17:12:33 migration/1
Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/1
Wed Oct 28 17:22:55 2009 17:12:33 watchdog/1
Wed Oct 28 17:22:55 2009 17:12:33 migration/2
Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/2
Wed Oct 28 17:22:55 2009 17:12:33 watchdog/2
Wed Oct 28 17:22:55 2009 17:12:33 migration/3
Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/3
Wed Oct 28 17:22:55 2009 17:12:33 watchdog/3
Wed Oct 28 17:22:55 2009 17:12:33 events/0
Unfortunately to my knowledge the ps in Solaris does not have etime or anything similar. It does have stime
STIME (f)
The starting time of the process, given in hours,
minutes, and seconds. (A process begun more than
twenty-four hours before the ps inquiry is executed is
given in months and days.)
You should be able to script a check using that info.
Charles H. Baker
Unix System Administration
cbaker at nuvox.com
864.331.7896 | 864.990.1297
It isn't where you came from; it's where you're going that counts. Ella Fitzgerald, jazz singer
From: Valerio.FABRIZIO at sungard.com [mailto:Valerio.FABRIZIO at sungard.com]
Sent: Thursday, October 29, 2009 9:58 AM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] R: check_procs
Hi
No, the processes are started and stopped with a crontab at a specified time.
Valerio Fabrizio * Technical Specialist * SunGard * Global Trading * GLESIA Srl - via Degli Amedei, 15 20123 Milano, Italy
Tel:+39 02 45442332 * Fax:+39 45 44 22 99 * Mobile:+39 3463949080 * valerio.fabrizio at sungard.com * www.sungard.com/GlobalTrading
________________________________
Da: Baker, Charles H. [mailto:cbaker at nuvox.com]
Inviato: giovedì 29 ottobre 2009 14.54
A: nagiosplug-help at lists.sourceforge.net
Oggetto: Re: [Nagiosplug-help] check_procs
Does the process have to run to completion? Or can it be shutdown at a specified time and started at a specified time?
Charles H. Baker
Unix System Administration
cbaker at nuvox.com
864.331.7896 | 864.990.1297
It isn't where you came from; it's where you're going that counts. Ella Fitzgerald, jazz singer
From: Valerio.FABRIZIO at sungard.com [mailto:Valerio.FABRIZIO at sungard.com]
Sent: Thursday, October 29, 2009 5:05 AM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] check_procs
Hi all
I'm using check_procs plugin to monitor our clients' processes (on Linux and Solaris OS), and I need to add a check on processes' date.
What I need Is to be sure that a process has started today (for us it's important that the procs we monitor stop in the evening and start again in the morning) can someone help me on this?
Valerio Fabrizio * Technical Specialist * SunGard * Global Trading * GLESIA Srl - via Degli Amedei, 15 20123 Milano, Italy
Tel:+39 02 45442332 * Fax:+39 45 44 22 99 * Mobile:+39 3463949080 * valerio.fabrizio at sungard.com * www.sungard.com/GlobalTrading
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20091029/d3918c5e/attachment.html>
More information about the Help
mailing list