Changing MAX_PLUGINOUTPUT_LENGTH in include/objects.h
Amri Karim
Karim.Amri at uptime.be
Mon May 3 14:52:11 CEST 2004
Hi,
When changing the value of MAX_PLUGINOUTPUT_LENGTH in include/objects.h,
the pre flight check prints out a warning message about the
size of the service_message struct being longer than the
POSIX-guaranteed
atomic write size. This is the actual code in base/config.c:
/*****************************************/
/* check sanity of service message size... */
/*****************************************/
if(sizeof(service_message)>512){
snprintf(temp_buffer,sizeof(temp_buffer),
"Warning: Size of service_message struct (%d bytes) is >
POSIX-guaranteed atomic write size (512 bytes). Service checks results
may get lost or mangled!",sizeof(service_message));
temp_buffer[sizeof(temp_buffer)-1]='\x0';
write_to_logs_and_console(temp_buffer,
NSLOG_VERIFICATION_WARNING,TRUE);
warnings++;
}
There has been some discussion about changing
MAX_PLUGINOUTPUT_LENGTH on this list bofore, I think.
I found these two links to be interesting:
https://sourceforge.net/mailarchive/message.php?msg_id=6783947
http://article.gmane.org/gmane.network.nagios.user/6486/match=ipc+size
They suggest that this value is related to the
BUF_SIZE setting of the OS.
If MAX_PLUGINOUTPUT_LENGTH has been bumped by 1000 bytes on a
custom install, I am wondering if this warning message can be
ignored on a modern Linux system - from looking at
include/linux/limits.h on a kernel tree and
/usr/include/linux/limits.h, it appears that Linux uses a
BUF_SIZE of 4096, well past the POSIX requirement of 512
bytes..
Can I just change base/config.c to reflect this before
compiling Nagios ? In other words, change the 512 on this line:
if(sizeof(service_message)>512){
Additionally, is it safe to increase this value to, say,
10000 or so bytes ? Or is that an absolute no-go under
any circumstances.
Thanks in advance,
Karim
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
More information about the Developers
mailing list