[naemon-dev] Memory leak in neb module using naemon headers

Daniel Ziegler info at nook24.eu
Fri Mar 27 09:21:49 CET 2015


Hi guys,

if i compile my event broker module with naemon header files it starts 
to heavy memory leak. If i compile the module using nagios header files 
it sill have a little memory problem but not as heavy as using the 
naemon files.

I attached you two graphs of my servers memory usage, one using naemon 
header files and one using nagios header files.
The memory usage of naemon process increased from 800 MB to 1280MB, and 
still growing. (Program Running Time: 14h 11m 26s, 66 Hosts and 14300 
Services)

There are only two differences in my source code if i compile the 
broker for naemon:
At first i load naemon header files instead of nagios header files and 
my log function is using nm_log() instead of write_to_all_logs().

I hope you can give me a hint where i should start search for the 
issue. Unfortunately this is my first C project so i have no experience 
how to troubleshoot C source code.

You can find my code at: 
https://github.com/nook24/statusengine/blob/master/statusengine/src/statusengine.c

Many thanks and best regards,

Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statusengine_naemon_header.png
Type: image/png
Size: 29213 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/naemon-dev/attachments/20150327/4b01f950/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statusengine_nagios_header.png
Type: image/png
Size: 27165 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/naemon-dev/attachments/20150327/4b01f950/attachment-0003.png>


More information about the Naemon-dev mailing list