<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="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Anthony
Montibello [mailto:amontibello@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, July 18, 2008 4:21
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Jonathan Williams<br>
<b><span style='font-weight:bold'>Cc:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Nagios-users] Help -
I am unable to get theNSClient++ to restart services</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Jonathan Williams wrote:<br>
> I did (at least similar).  I ran it and it returned:<br>
><br>
> /usr/local/bin/pearl -w<br>
><br>
<br>
I'm guessing the output was actually<br>
#! /usr/local/bin/perl -w<br>
which is quite different from what you wrote, but I'll have to<br>
assume that the output you gave me is actually correct (who in<br>
their right minds would give false info to someone who's trying<br>
to help them??), so here it goes:<br>
<br>
* There's your error right there. To begin with, you probably don't<br>
have a binary named "pearl" anywhere on your system.<br>
* There's "#!" in front of the name of the script interpreter, so<br>
the kernel has no idea what to do with it.<br>
<br>
Run this command and it'll magically start working:<br>
<br>
sed -i '1s,.*,#!/usr/bin/perl -w,' check_sendmail.pl<br>
<br>
Note that "similar" hardly ever cuts it, especially if you want<br>
more help and don't paste the "similar" command you actually<br>
used along with the output it produced. copy-paste is your<br>
friend.<br>
<br>
--<br>
Andreas Ericsson                  
<a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>
OP5 AB                    
        <a href="http://www.op5.se/" target="_blank">www.op5.se</a><br>
Tel: +46 8-230225                
 Fax: +46 8-230231<o:p></o:p></span></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Got it...as far as the top posting goes...makes sense.  Thanks.
 And yes<br>
there was a #! In front as you said.  I did say similar just because the<br>
OP who was helping me said I would get something similar to<br>
#!/usr/bin/perl <args-to-perl>.  My output was similar to that, but
not<br>
exact.  Thanks for the response. I ran the following:<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
sed -i '1s,.*,#!/usr/bin/perl -w,' check_sendmail.pl<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>return:<br>
<br>
sed: can't read check_sendmail.pl: No such file or directory<o:p></o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
 <o:p></o:p></span></font></p>

</div>

</div>

</blockquote>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I been following  your Emails on this issue and it looks like this
must be some simple mistake somewhere, for example runtime Libexec is not the
directory your using, FIlemames mispellings, things missing from the path or
some other unkown issue.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Try running some normal shell script that just gives a date or pwd to
validate the Libexec directory you are copying files to is the one nagios is
run from.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>In the above command was it suppose to be sendmail.pl instead of
check_sendmail.pl ? (I am not sure I did not think hard about what the command
does) but most of the prior emails mentioned only sendmail.pl while check_ is
common prefix of most common nagios plugins.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Last in prior posts I noticed the -n in the command has a space between
the - and the n is it really there or is it just my email reader? if it is
there should it be there?<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Tony (Author of NC_net)<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>(I actually prefer reading Top posted msg - but I understand
Andreas  point on Bottom posting or inline posting)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>Good question
Tony.  There is no such file called check_sendmail on my system.  Other scripts
are running fine out of /usr/local/nagios/libexec.  I am not sure if perhaps
the send_mail.pl script is perhaps looking for the pearl binary in the wrong
folder </span></font><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>/usr/bin/perl as
opposed to /usr/local/bin/perl?  I am not at work now but will dig in later
tonight.  I am a victim of my own lack of Linux experience here I admit, but I’m
learning.  I have a feeling if any of you were looking at everything I have
here it would jump out at you.  I’m going to team up with a colleague of
mine here who is a good Linux guy and get his input as well.  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>As usual thanks
again for your time and expertise.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>Jon<o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>