CPU usage just stopped working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
steve.chambers
Posts: 17
Joined: Wed Aug 14, 2013 10:43 am

CPU usage just stopped working

Post by steve.chambers »

So a few days ago the CPU usage counter on one of my Win 2012 (r2 64 bit) just stopped working. It is one of five identical servers on the same (ESX 5.5) host. All of the other VMs are still happily chugging away and giving CPU usage stats and I verified that the command being sent is the same as on the other VMs:

Code: Select all

check_xi_service_nsclient!PASSWORD!CPULOAD!-l 5,80,90
The error I get is:

Code: Select all

NSClient - ERROR: Could not get data for 5 perhaps we don't collect data this far back?
Any ideas how to proceed?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: CPU usage just stopped working

Post by hsmith »

I found this article on the NSClient support forums. You are going to want to start by doing the steps outlined there.

Thanks.
Former Nagios Employee.
me.
steve.chambers
Posts: 17
Joined: Wed Aug 14, 2013 10:43 am

Re: CPU usage just stopped working

Post by steve.chambers »

That forum post is vaguely unhelpful as it mentions something about a tool to rebuild counters and that there was more info in the FAQ. The problem there is I could not find an FAQ on that site.

I did eventually find someone who executed this command

Code: Select all

lodctr.exe /R
Which may or may not be the tool that was referred to but I just get an error:

Code: Select all

Error: Unable to rebuild performance counter setting from system backup store, error code is 5
Even if I run the command from an elevated prompt same error.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU usage just stopped working

Post by tgriep »

Was the elevated account a local administrator account on the system?
What type of system are you trying to test?
What is the version on the NSClient++ that you are running?
Can you check the nsclient.log file for any errors?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: CPU usage just stopped working

Post by Box293 »

As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
steve.chambers
Posts: 17
Joined: Wed Aug 14, 2013 10:43 am

Re: CPU usage just stopped working

Post by steve.chambers »

The elevated CMD prompt was a local administrator. In fact I ran it again this morning, only this time using a lowercase "r" and the command executed correctly. Odd since it and the help for the command shows an uppercase R.

If I then run lodctr /q all services seem to be enabled and this is the result of nsclient++exe /test

Code: Select all

C:\Windows\system32>"C:\program files\nsclient++\nsclient++.exe" /test
Launching test mode - client mode
Service seems to be started, this is probably not a good idea...
d NSClient++.cpp(1216) Enabling debug mode...
d NSClient++.cpp(557) Attempting to start NSCLient++ - 0.3.9.328 2011-08-16
NSCore not loaded...
Archiving crash dumps in: C:\Users\steve.chambers\AppData\Local\NSClient++\crash dumps
d NSClient++.cpp(1007) Loading plugin: CheckDisk...
d NSClient++.cpp(1007) Loading plugin: Event log Checker....
d NSClient++.cpp(1007) Loading plugin: Helper function...
d NSClient++.cpp(1007) Loading plugin: CheckSystem...
d NSClient++.cpp(1007) Loading plugin: CheckWMI...
d \PDHCollector.cpp(73) Autodetected w2k or later, using w2k PDH counters.
d NSClient++.cpp(1007) Loading plugin: File logger...
d \PDHCollector.cpp(110) Using index to retrive counternames
l \FileLogger.cpp(87) Log path is: C:\program files\nsclient++\\nsclient.log
d NSClient++.cpp(1007) Loading plugin: NRPE server (w/ SSL)...
d \NRPEListener.cpp(92) Loading all commands (from NRPE)
e \NRPEListener.cpp(70) No scripts found in path: scripts\*.*
d \NRPEListener.cpp(122) Starting NRPE socket...
d NSClient++.cpp(1007) Loading plugin: NSClient server...
d NSClient++.cpp(709) NSCLient++ - 0.3.9.328 2011-08-16 Started!
l NSClient++.cpp(461) Using settings from: INI-file
l NSClient++.cpp(462) Enter command to inject or exit to terminate...
e \Socket.h(691) bind failed: 10048: Only one usage of each socket address (protocol/network addre
/port) is normally permitted.
e \Socket.h(722) Socket did not start properly, we will now do nothing...
e \Socket.h(691) bind failed: 10048: Only one usage of each socket address (protocol/network addre
/port) is normally permitted.
e \Socket.h(722) Socket did not start properly, we will now do nothing...
d \PDHCollector.cpp(130) Found countername: CPU:    \Processor(_total)\% Processor Time
d \PDHCollector.cpp(131) Found countername: UPTIME: \System\System Up Time
d \PDHCollector.cpp(132) Found countername: MCL:    \Memory\Commit Limit
d \PDHCollector.cpp(133) Found countername: MCB:    \Memory\Committed Bytes
The command seems to just stop there and a CTRL-C gets out of it...

This is a Windows 2012r2 VM running on ESX 5.5.

When I run nsclient++ /test I get this as a version string: 0.3.9.328 2011-08-16

and the nsclient log looks like this, I didn't see any obvious errors)

2015-09-09 08:05:10: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.9.328 2011-08-16
2015-09-09 08:05:11: message:CACHENSClient++.cpp:445: Booting: NSClientpp (Nagios) 0.3.9.328 2011-08-16 x64
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1216: Enabling debug mode...
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.328 2011-08-16
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckDisk...
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: Event log Checker....
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: Helper function...
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckSystem...
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: CheckWMI...
2015-09-09 08:05:11: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:73: Autodetected w2k or later, using w2k PDH counters.
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: File logger...
2015-09-09 08:05:11: debug:CACHEmodules\CheckSystem\PDHCollector.cpp:110: Using index to retrive counternames
2015-09-09 08:05:11: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\program files\nsclient++\\nsclient.log
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: NRPE server (w/ SSL)...
2015-09-09 08:05:11: debug:CACHEmodules\NRPEListener\NRPEListener.cpp:92: Loading all commands (from NRPE)
2015-09-09 08:05:11: error:CACHEmodules\NRPEListener\NRPEListener.cpp:70: No scripts found in path: scripts\*.*
2015-09-09 08:05:11: debug:CACHEmodules\NRPEListener\NRPEListener.cpp:122: Starting NRPE socket...
2015-09-09 08:05:11: debug:CACHENSClient++.cpp:1007: Loading plugin: NSClient server...
2015-09-09 08:05:11: debug:NSClient++.cpp:709: NSCLient++ - 0.3.9.328 2011-08-16 Started!
2015-09-09 08:05:11: message:NSClient++.cpp:461: Using settings from: INI-file
2015-09-09 08:05:11: message:NSClient++.cpp:462: Enter command to inject or exit to terminate...
2015-09-09 08:05:11: error:include\Socket.h:691: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2015-09-09 08:05:11: error:include\Socket.h:722: Socket did not start properly, we will now do nothing...
2015-09-09 08:05:11: error:include\Socket.h:691: bind failed: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2015-09-09 08:05:11: error:include\Socket.h:722: Socket did not start properly, we will now do nothing...
2015-09-09 08:05:11: debug:modules\CheckSystem\PDHCollector.cpp:130: Found countername: CPU: \Processor(_total)\% Processor Time
2015-09-09 08:05:11: debug:modules\CheckSystem\PDHCollector.cpp:131: Found countername: UPTIME: \System\System Up Time
2015-09-09 08:05:11: debug:modules\CheckSystem\PDHCollector.cpp:132: Found countername: MCL: \Memory\Commit Limit
2015-09-09 08:05:11: debug:modules\CheckSystem\PDHCollector.cpp:133: Found countername: MCB: \Memory\Committed Bytes
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU usage just stopped working

Post by tgriep »

Can you upload your nsc.ini file so we can review it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
steve.chambers
Posts: 17
Joined: Wed Aug 14, 2013 10:43 am

Re: CPU usage just stopped working

Post by steve.chambers »

Added nsc.ini file as requested, thx!
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU usage just stopped working

Post by tgriep »

Thanks for the file, nothing looks wrong in it.
Couple of things, Can you restart the NSClient service in the Windows system and see if that resolves the issue?
If that doesn't work, can you reboot the Windows host?
Be sure to check out our Knowledgebase for helpful articles and solutions!
steve.chambers
Posts: 17
Joined: Wed Aug 14, 2013 10:43 am

Re: CPU usage just stopped working

Post by steve.chambers »

neither restarting the service nor the VM has any effect on the error message
Locked