[Nagiosplug-devel] Perf Data

Richard Colley rcolley at cardaccess.com.au
Tue Feb 18 18:17:11 CET 2003


It would seem to me that relying on something like atomic write sizes is
something of a hack.

Maybe it is time to wrap the named external command pipe with an API that
serialises messages into the pipe.

Also, a simpler way of fixing this issue for the internal non-named pipes
from Nagios to children would be to have one pipe per child.  Given the
number of children that would normally be active simultaneously, this
shouldn't be a major issue.

Richard


-----Original Message-----
From: Ethan Galstad [mailto:nagios at nagios.org] 
Sent: Wednesday, 19 February 2003 12:45 PM
To: nagiosPlug Devel
Subject: Re: [Nagiosplug-devel] Perf Data


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



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Nagiosplug-devel mailing list
Nagiosplug-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
 




More information about the Devel mailing list