[Nagiosplug-devel] Perf Data

Ethan Galstad nagios at nagios.org
Tue Feb 18 17:47:08 CET 2003


On 18 Feb 2003 at 20:40, Subhendu Ghosh wrote:

> On Tue, 18 Feb 2003, Ethan Galstad wrote:
> <snip>
> >
> > There are two pipes of interest.  One is the external command file, 
> > which is implemented as a FIFO and is restricted by the PIPE_BUF 
> > limit (512 bytes minimum for POSIX).  Passive checks have to deal 
> > with this limit, but not active checks.
> > 
> > The other pipe is used for IPC between the main (parent) Nagios 
> > process and the child processes.  Each child writes the results of a 
> > plugin check (along with host/service name) to the pipe, at which 
> > point the parent reads it and process it.  This pipe is also 
> > restricted by the PIPE_BUF limit.  With host/service name overhead, 
> > you're left with about 350 bytes useable for plugin output+perfdata.  
> > It should be noted that *both* active and passive checks have results 
> > sent through this pipe.  Passive checks enter through the FIFO and 
> > then get dumped into this pipe.
> > 
> > If the size of the pipe becomes a real issue, we can probably break 
> > with POSIX compliance on most systems.  The POSIX standard states a 
> > minimum of 512 bytes, but Linux has a 4K atomic write limit, while 
> > Solaris may have an 8K limit (I don't recall offhand).  I guess I'll 
> > have to deal with it if and when it comes up.
> > 
> 
> The second pipe - is that a single pipe per running install from the 
> temp_file var in the config file?
> 

Its a single pipe, although its not implemented as a FIFO, so it 
doesn't exist anywhere in the filesystem - just in memory.  You can 
think of it as a very limited type of socket that you would 
read/write from/to for network apps.  It has one reader (the parent 
process) and multiple writers (the child processes).  Its implemented 
with a call to pipe(2).



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org





More information about the Devel mailing list