Re: [Nagios-devel] Problems with many hanging Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Problems with many hanging Nagios

Post by Guest »

Ethan Galstad wrote:
> Good work on nailing down the problem to the command buffer slots!
> Sounds like this problem might affect a number of users, so I think we
> need to patch Nagios. There are two possible solutions:
>
> 1. Bump up the default buffer slots to something larger. Since Nagios
> only immediately allocates memory for pointers, the additional memory
> overhead is fairly small. Allocated memory = (sizeof(char **)) * (# of
> slots).
>
> 2. Moving the slots definitions out to command file variables. This is
> a better solution than having to edit the code and recompile.
>
> Thoughts?
>

3. Make the number of slots dynamic and allocate memory as needed. It
should never release any allocated memory, but just increase the number
of buffer slots as needed. One probably wants to allocate the buffer
slots in chunks of sysconf(_SC_PAGESIZE) / (sizeof(char *)) to keep it
to one page at a time, which will prevent expensive memory copying on
realloc().

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked