NSClient++ Help (#1) - NSClient++ leak memory when using "NRPE Client Handlers" (#558) - Message List
I recently found that NSClient++ leaks memory when using "NRPE Client Handlers". The symtom is that the memory of nsclient++.exe process will always increase. It will consume about 50MB in about 12 hours. I once observed it allocated more than 1GB RAM. The following is excerpted from my nsc.ini:
[modules] NRPEListener.dll NRPEClient.dll ...... [NRPE Client Handlers] check_dhjybk_load=-H 128.0.2.5 -p 5666 -c check_load check_dhjybk_disk=-H 128.0.2.5 -p 5666 -c check_disk check_dhjybk_total_procs=-H 128.0.2.5 -p 5666 -c check_total_procs check_dhjybk_oracle_procs=-H 128.0.2.5 -p 5666 -c check_oracle_procs check_dhjybk_swap=-H 128.0.2.5 -p 5666 -c check_swap check_dhjybk_meminfo=-H 128.0.2.5 -p 5666 -c check_meminfo check_dhjybk_hp_disk_array=-H 128.0.2.5 -p 5666 -c check_hp_disk_array check_dhjybk_alert_log=-H 128.0.2.5 -p 5666 -c check_alert_log check_dhjybk_listener=-H 128.0.2.5 -p 5666 -c check_listener ......
Checking the nsclient.log, there are some errors:
2010-04-07 10:17:34: error:modules\NRPEListener\NRPEListener.cpp:435: Truncating returndata as it is bigger then NRPE allowes :( 2010-04-07 10:27:34: error:modules\NRPEListener\NRPEListener.cpp:435: Truncating returndata as it is bigger then NRPE allowes :( 2010-04-07 10:37:34: error:modules\NRPEListener\NRPEListener.cpp:435: Truncating returndata as it is bigger then NRPE allowes :(
Is there any idea about that?
-
Message #1701
Which version do you have?
MickeM
mickem04/14/10 06:43:13 (3 years ago)-
Message #1722
The version of NSClient++ is 0.3.7.493. Now it will leak about 100MB memory in 1 day. The only thing I can do is to restart the NSClientpp service.
I have check your source code of NRPEListener.cpp:
if (msg.length() >= buffer_length_-1) { NSC_LOG_ERROR(_T("Truncating returndata as it is bigger then NRPE allowes :(")); msg = msg.substr(0,buffer_length_-2); }I think that the old "msg" might not be freed.
fqf104/15/10 04:02:04 (3 years ago)-
Message #1723
Humm,
I tried running things here without any leaks. SO we need to dig deaper.
Could you supply me with the ini file and log from debug? (feel free to remove any personal things like password and host info)
Also you can use the "DebugLog?" module to log a run and send me the collected report via email michael <AT> medin <DOT> name?
+ Added new module A_DebugLogMetrics.dll which can be used to generate debug info. Enable the module and a file called process_info.csv will be created under %APP_DATA%/nsclient++/process_info.csv which contains metrics.
[Modules] ... A_DebugLogMetrics.dll ...
Michael Medin
mickem04/15/10 07:45:06 (3 years ago)
-
-








