Opened 19 months ago
Closed 15 months ago
#481 closed defect (fixed)
external command with large result very slow
| Reported by: | oskar | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.4.0 |
| Component: | CheckExternalScripts | Version: | 0.3.9 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
I have check_nrpe on the server with multiline patch (https://dev.icinga.org/attachments/113/nrpe_multiline.patch), and NSClient++ 0.3.9. In the client's nsc.ini:
[modules] .. NRPEListener.dll CheckExternalScripts.dll [Settings] .. string_length=65536 [NRPE] .. packet_count=64 [External Script] list_services=sc query state= all
If I run 'sc query state= all' in a terminal it completes in a fraction of a second. (sc is a standard command in Windows XP and later. The particular command will show detailed information on all services in the system.) But if I run 'check_nrpe .. -c list_services' on the server it takes 9-15 seconds to complete. In other words it's maybe 100 times slower through NRPE and NSClient++. The server and client are connected over a gigabit network so the issue isn't there. I get similar delays when using any command that outputs ~50K of data in NSClient++ (e.g. "cmd /c type 50k_file.txt" or something).
Maybe NSClient++ isn't designed to return that much data but it seems there is some communication/locking issue inside NSClient++ 0.3.9 that causes this. During the 10 second delay there isn't significant CPU use of the client though. Also the log says:
2011-10-23 01:21:39: debug:NSClient++.cpp:1144: Injecting: list_services:
2011-10-23 01:21:42: debug:NSClient++.cpp:1180: Injected Result: OK '
[all output]
2011-10-23 01:21:42: debug:NSClient++.cpp:1181: Injected Performance Result:
It is almost always 3 seconds between the two first lines.
Let me know if there is more I can test.
Regards,
Oskar Liljeblad (oskar@…)
Change History (3)
comment:1 Changed 15 months ago by mickem
- Milestone set to 0.4.0
- Owner changed from MickeM to mickem
comment:2 Changed 15 months ago by mickem
- Component changed from Core to CheckExternalScripts
comment:3 Changed 15 months ago by mickem
- Resolution set to fixed
- Status changed from new to closed









Improved the speed of this a lot.
This will be in RC3 (or next nightly build)