check_snmp memory leak

Thomas Guyot-Sionnest dermoth at aei.ca
Mon Apr 13 18:13:25 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/04/09 07:26 PM, jmoseley at corp.xanadoo.com wrote:
> You could have also just disabled the embedded perl interpreter in the
> plugin itself.  By disabling the embedded perl function, your load  and
> memory usage will certainly be higher.
> 
> The real question, though, is since you're using Cent OS, why not use the
> Nagios RPM's available via yum repository?  It makes upgrading and keeping
> track of dependencies a breeze.
> 
> Not sure what the problem was, but I compiled Nagios 3.0.6 on a RHEL 3
> system using the exact options that were found in the RPM spec file.  I
> ended up with a nagios binary that was twice as large as the one that came
> in the RPM package and the version I compiled myself ran using more memory
> and processor resources than the RPM version.  The difference was probably
> the compiler flags I was using were not optimized for my (or any RHEL)
> system.

Are you sure your nagios binaries have been stripped?
> $ ls -lh /usr/src/nagios-3.0.1-cvs/base/nagios /usr/local/nagios/bin/nagios
> -rwxrwxr-- 1 nagios nagios 1.5M 2008-05-06 11:15 /usr/local/nagios/bin/nagios*
> -rwxr-xr-x 1 user   user   2.1M 2008-05-06 10:08 /usr/src/nagios-3.0.1-cvs/base/nagios*
> $ file /usr/src/nagios-3.0.1-cvs/base/nagios /usr/local/nagios/bin/nagios
> /usr/src/nagios-3.0.1-cvs/base/nagios: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
> /usr/local/nagios/bin/nagios:          ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

The memory and processor (system time) is directly related to the size
of the running process (which includes executable image size). Every
time Nagios executes a check it has to fork two or three times
(depending on configuration) and the kernel has to map/copy the
executable memory for the new processes. Performance degradation can
become even worse on systems that does not support copy-on-write for
forked processes as they perform a full copy of the process memory
during forks only to free it seconds later.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ42Sl6dZ+Kt5BchYRAkMpAKCZTMJLOmfelHxjRfwOcV3qfYyrIACeMwaC
8u+QBWjmHfSjOvcYg3pQhK4=
=pL0b
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
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