<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Comic Sans MS";
panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Verdana","sans-serif";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Verdana","sans-serif";
color:black;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 56.7pt 56.7pt 56.7pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Well, on linux you can get a couple of columns useful to your
need from the ps command. They are:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>lstart STARTEDtime the command started.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>And <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>etime ELAPSEDelapsed time since the process was started, in
the<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> form [[dd-]hh:]mm:ss.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For example<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>cbaker@rain:~$ ps -Ao lstart,etime,comm<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> STARTED ELAPSED COMMAND<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 init<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 kthreadd<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 migration/0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 watchdog/0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 migration/1<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/1<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 watchdog/1<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 migration/2<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/2<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 watchdog/2<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 migration/3<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 ksoftirqd/3<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 watchdog/3<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Wed Oct 28 17:22:55 2009 17:12:33 events/0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Unfortunately to my knowledge the ps in Solaris does not have
etime or anything similar. It does have stime <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>STIME (f)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> The starting time of the process, given in
hours,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> minutes, and seconds. (A process begun more
than<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> twenty-four hours before the ps inquiry is executed
is<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> given in months and days.)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You should be able to script a check using that info.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Charles H. Baker<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Unix System Administration<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>cbaker@nuvox.com<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>864.331.7896 | 864.990.1297<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It isn't where you came from; it's where you're going that
counts. Ella Fitzgerald, jazz singer<o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
Valerio.FABRIZIO@sungard.com [mailto:Valerio.FABRIZIO@sungard.com] <br>
<b>Sent:</b> Thursday, October 29, 2009 9:58 AM<br>
<b>To:</b> nagiosplug-help@lists.sourceforge.net<br>
<b>Subject:</b> [Nagiosplug-help] R: check_procs<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>Hi<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>No, the processes are started and stopped with a crontab at a
specified time.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<div>
<div>
<p class=MsoNormal><span lang=IT style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>Valerio Fabrizio<b> * </b>Technical Specialist *
SunGard * Global Trading * GLESIA Srl - via Degli Amedei, 15 20123 Milano,
Italy<br>
Tel:+39 02 45442332 * Fax:+39 45 44 22 99 * Mobile:+39 3463949080 *
valerio.fabrizio@sungard.com * www.sungard.com/GlobalTrading</span><span
lang=IT style='font-family:"Comic Sans MS";color:black'><o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><span lang=IT style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p> </o:p></span></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><span lang=IT>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal><b><span lang=IT style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Da:</span></b><span
lang=IT style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Baker,
Charles H. [mailto:cbaker@nuvox.com] <br>
<b>Inviato:</b> giovedė 29 ottobre 2009 14.54<br>
<b>A:</b> nagiosplug-help@lists.sourceforge.net<br>
<b>Oggetto:</b> Re: [Nagiosplug-help] check_procs</span><span lang=IT><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span lang=IT><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Does the process have to run to completion? Or can it be
shutdown at a specified time and started at a specified time?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Charles H. Baker<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Unix System Administration<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>cbaker@nuvox.com<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>864.331.7896 | 864.990.1297<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It isn't where you came from; it's where you're going that
counts. Ella Fitzgerald, jazz singer<o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
Valerio.FABRIZIO@sungard.com [mailto:Valerio.FABRIZIO@sungard.com] <br>
<b>Sent:</b> Thursday, October 29, 2009 5:05 AM<br>
<b>To:</b> nagiosplug-help@lists.sourceforge.net<br>
<b>Subject:</b> [Nagiosplug-help] check_procs<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Hi
all<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>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?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-GB style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span lang=IT style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Valerio
Fabrizio<b> * </b>Technical Specialist * SunGard * Global
Trading * GLESIA Srl - via Degli Amedei, 15 20123 Milano, Italy<br>
Tel:+39 02 45442332 * Fax:+39 45 44 22 99 * Mobile:+39 3463949080 *
valerio.fabrizio@sungard.com * www.sungard.com/GlobalTrading</span><span
lang=IT style='font-family:"Comic Sans MS"'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span lang=IT><o:p> </o:p></span></p>
</div>
</body>
</html>