Increase the efficiency of passive checks

Mooney, Ryan ryan.mooney at pnl.gov
Mon Apr 12 18:29:57 CEST 2004


 
> To alter the size of the named pipe, you need to hack the kernel 
> sources. This is NOT recommended, since some programs expect 
> a pipe to 
> be of a certain size.

Hmm, that's a scary assumption for a program to make :>  If you have
a lot of passive checks some people have found it worth while to
increase
the size of the pipe since the kernel scheduler on some versions of the
Linux kernel has poor behavior that causes the (forkedd) processes
reading the
pipe to hang for a really long time.  There was a thread on this a few
months back, look for "[Nagios-users] Processes hung on pipe writes (and
other fun)"
for the thread.  
 
> The easiest way would probably be to let nagios use a socket in 
> non-blocking mode instead. The problem with that is that only one 
> process at the time can access it, so you'll have to rewrite 
> the passive 
> check submitter to work in spinlock mode (a connect() retry 
> every 10 ms 
> should work ok). This will most likely produce a rather significant 
> increase in system load, however, but by what you've told me 
> so far that 
> won't be a problem.

Not true, every process that connects to the socket will generate a
separate
fd, nagios could then use a select() to find out which were ready for 
reading.  This would be a non trivial change requiring some coding
skills
though since the pipe thing is fairly entwined in how the whole process
works 
(not impossible just some time involved).

> -- 
> Mvh
> Andreas Ericsson
> OP5 AB
> +46 (0)733 709032
> andreas.ericsson at op5.se
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President 
> and CEO of GenToo technologies. Learn everything from 
> fundamentals to system 
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS 
> when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list