NRPE packet buffer limitations

Andreas Ericsson ae at op5.se
Wed Jan 3 13:14:24 CET 2007


Mike Emigh wrote:
> Greetings,
> 
> I was wondering if anyone had found the proper way to modify nrpe to 
> receive
> more than the 1024 character limit imposed in MAX_PACKETBUFFER_LENGTH.  I
> adjusted it from 1024 to 1536 and have used this setting for quite some 
> time
> now and it works; however, graceful connection shutdowns are not possible
> when using this modification.
> 
> It appears that nrpe tries to send all data in just a single packet.

Userland (normally) has no control over how many packets are sent to 
transmit data. Such low-level things are handled by the kernel. The 
number of bytes that can be passed to send(), write(), sendto() or any 
of the other means of passing data to a different host over a network is 
determined by the size of the kernel socket buffers for the socket in 
question. This is normally much, much larger than the ~1500 bytes which 
is most systems MTU. In particular, it never makes any sense for the 
kernel to have less than one page allocated for this purpose. As one 
page is usually 4096 bytes on 32-bit systems, that's the smallest 
reasonable minimum size you'll find.

>  Is
> there a reason that multiple packets aren't used if the packet buffer isn't
> large enough to accommodate all of the plugin output?

Multiple packets are used if the size of the data to transmit is bigger 
than the MTU - size of packet headers.

>  I could see this
> being especially troublesome for Nagios 3.0 as the buffer will be too small
> to fully take advantage of multiline output.
> 

Indeed. It would be better if NRPE just kept reading and outputting as 
long as there was data to fetch and just ignored all buffer sizes. It 
has never bothered me though, so I haven't bothered trying to fix what I 
don't consider broken.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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