<div>Hi List,</div>
<div> </div>
<div>First I think this is more appropiate fpr the Developer list so I hope Ethan has been watching this thread.</div>
<div> </div>
<div>If your observation is true,</div>
<div>should Nagios have an internal default hostcheck command or some code to deactivate hostchecks when no hostcheck command is entered?</div>
<div> </div>
<div>Tony (author of NC_Net)<br><br> </div>
<div><span class="gmail_quote">On 9/10/07, <b class="gmail_sendername">SCHAER Frederic</b> <<a href="mailto:frederic.schaer@cea.fr">frederic.schaer@cea.fr</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div lang="FR" vlink="purple" link="blue">
<div>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I finally found a solution :</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">either deactivate the host checks or… define a check_command for the hosts : with host_checks_enabled and without a check command, nagios eats all of my CPU, with a command defined, everything is back to normal…
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I wish I saw I had no check_command defined in my host template !</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Cheers</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none">
<div>
<div style="TEXT-ALIGN: center" align="center"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">
<hr align="center" width="100%" size="2">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</span></font></b><font face="Tahoma" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> SCHAER Frederic
<br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> Monday, September 10, 2007 5:56 PM<br><b><span style="FONT-WEIGHT: bold">To:</span></b> SCHAER Frederic; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users@lists.sourceforge.net" target="_blank">
nagios-users@lists.sourceforge.net</a><br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> RE: [Nagios-users] nagios 3.0b3 abnormal cpu load ?</span></font></p></div>
<div><span class="e" id="q_114f039752172429_1">
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">/me again…</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">It seems there is a problem with host checks on my box that causes host checks to be run continuously on the same host(s) – well it seems that there is indeed no host check run because one is « always » executing ( ? no, it's not ! ).
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">logs show this for a debug run of just a few seconds :</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"># grep "A check of this host is already being executed" /var/log/nagios/nagios.debug | wc -l
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> 1709</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">de-activating host checks (execute_host_checks=0)in the nagios.cfg file frees the CPU, at the cost of host checks… it's good to know, isn't it ? ;)
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Is this really usefull anyway if I define a check_ping service on all hosts ?</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Cheers</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none">
<div>
<div style="TEXT-ALIGN: center" align="center"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">
<hr align="center" width="100%" size="2">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</span></font></b><font face="Tahoma" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank">
nagios-users-bounces@lists.sourceforge.net</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank">nagios-users-bounces@lists.sourceforge.net
</a>] <b><span style="FONT-WEIGHT: bold">On Behalf Of </span></b>SCHAER Frederic<br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> Monday, September 10, 2007 12:25 PM<br><b><span style="FONT-WEIGHT: bold">To:</span></b>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: [Nagios-users] nagios
3.0b3 abnormal cpu load ?</span></font></p></div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi again,</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">There is a difference between the nagios I compiled on the 2.4 kernel / RHEL3 box on the one hand, and the
2.6 one on Ubuntu on the other hand :</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">when stracing the nagios process, I can see it's calling the nanosleep() function – and it then sleeps -, whereas on the
2.4 box I can't see such a call : I just see this kind of thing (and lots of these) :</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 161574}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 183742}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 183780}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 183814}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 184172}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 184326}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 184734}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 184861}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 184984}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">time([1189419621]) = 1189419621</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 185537}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">gettimeofday({1189419621, 185734}, NULL) = 0</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Bad thing is that I tried to configure with and without the –enable-nanosleep or –disable-nanosleep switches, but this apparently has no effect :'(.
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">So it seems nagios is sleeping all the time, eating the CPU… I'm still trying to see if I can find a way to compile with a "working sleep".
</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Fred</span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none">
<div>
<div style="TEXT-ALIGN: center" align="center"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">
<hr align="center" width="100%" size="2">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</span></font></b><font face="Tahoma" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank">
nagios-users-bounces@lists.sourceforge.net</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank">nagios-users-bounces@lists.sourceforge.net
</a>] <b><span style="FONT-WEIGHT: bold">On Behalf Of </span></b>SCHAER Frederic<br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> Friday, September 07, 2007 5:51 PM<br><b><span style="FONT-WEIGHT: bold">To:</span></b>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> [Nagios-users] nagios
3.0b3 abnormal cpu load ?</span></font></p></div>
<p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I'm trying to setup a nagios 3.0b3 server, and I configured it with only one host, one check (ping).</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I can successfully start nagios, but I have concerns about the server cpu load : that's around 99% cpu usage all the time, on a P4 3GHz machine…
</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there something I could do to decrese this load ? I tried installing a nagios 2.9 server using the same configuration, and the load caused by nagios is just … 0.
</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I guess this is a bug in the beta 3 ?</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Increasing the sleep time in nagios.cfg does not help at all even if I put sleep_time=2500 (2500 seconds !)</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Any suggestions would be welcome </span></font><font face="Wingdings" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings">
J</span></font><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">P.S : I compiled nagios on a 2.4.21 linux kernel, using gcc 3.2.3, don't know if this could help. I don't see many usefull things with maximum debug verbosity…
</span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" size="2"><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span></font></p></div></div></span></div></div></div></div><br>-------------------------------------------------------------------------
<br>This SF.net email is sponsored by: Microsoft<br>Defy all challenges. Microsoft(R) Visual Studio 2005.<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><br>_______________________________________________<br>Nagios-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>