Resyncing the counters with Windows Management Instrumentation (WMI):
WINMGMT.EXE /RESYNCPERF
Stop and restart the Performance Logs and Alerts service.
Stop and restart the Windows Management Instrumentation service.
The cdm probe throws the following error in the cdm.log or you see it in the alarm sub-console:
Internal Alarm. Unable to get CPU data (error)
You may also see errors in the cdm log file similar to the following:
cdm: ntgetuptime: Unable to get the 'System Up Time' counter of the 'System' performance object
If you are seeing these types of errors in the cdm log here is the solution:
Verify on local Windows XP/2000/2003/2008 etc machine that performance counters are intact and visible using 'perfmon' tool on the local system e.g., for Processor.
If the perfmon counters are corrupted on your machine you’ll see numbers like 1151, 1112, 1167, etc. instead of performance counter names/strings.
Also please check out this Microsoft KB article:
http://support.microsoft.com/kb/300956
If your counters are corrupted for instance, you can try issuing this command as administrator:
lodctr /R
Then recheck the counters to make sure they are repaired.
If the counters are successfully repaired, you MUST reboot after the rebuild.
Also via Regedit, take note of:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfOS\Performance
In this key, there could be a Disable Performance Counters value that is set to 1. You may have to reset that value to 0, and then Deactivate and Activate the cdm probe.
Also note that by default, some counters are not enabled on Windows machines so they have to be manually enabled. For more info see:
http://support.microsoft.com/kb/253251
How to manually rebuild Performance Counter Library values
http://support.microsoft.com/kb/300956
Missing Objects and Counters in Performance Monitor
http://support.microsoft.com/default.aspx?scid=kb;EN-US;127207
Note that one solution is to export the registry key from another system and apply it to the subject computer.
Processor performance monitor (perfmon) object is not available:
http://technet.microsoft.com/en-us/library/aa995672%28v=exchg.80%29.aspx
Some performance objects and counters are not available on the computer.
http://support.microsoft.com/kb/884558
This information applies to any Windows system missing the following objects.
- Cache
- Memory
- Objects
- Processor
- System
Also, if you are seeing the errors listed below in the cdm.log file:
cdm: Error from GetNameStrings - RegQueryValueEx (Counter): The system cannot find the file specified.
It means that Windows standard API RegQueryValueEx is failing to get registry handle for the key under HKEY_LOCAL_MACHINE.
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Perflib\009
Open the registry editor using regedit command and check the HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Perflib\009
counter value. It should display the counters and its values.
NOTE: The counter under the 009 registry hive must be in English, not localized language.
If the counters are not available, please follow the Microsoft links to manually rebuild the Performance Counters.
https://support.microsoft.com/en-us/kb/300956
The need to repair counters may apply to the ntperf/ntper64 probes and related Windows perfmon performance counters as well.
Resyncing the counters with Windows Management Instrumentation (WMI):
WINMGMT.EXE /RESYNCPERF
Stop and restart the Performance Logs and Alerts service.
Stop and restart the Windows Management Instrumentation service.
Rerun the counter rebuild commands and that should fix the issue.
Other Helpful Information:
Nov 4 08:58:17:987 [8516] cdm: GetCpuInfo(300 1)
Nov 4 08:58:17:987 [8516] cdm: Fetching NT cpu usage
Nov 4 08:58:17:987 [8516] cdm: perfTakeSample (remember=1)
Nov 4 08:58:17:987 [8516] cdm: perfTakeSample (object=2 4 234 236 238 510)
Nov 4 08:58:18:091 [8516] cdm: perfGetValue (object=Processor, counter=% Processor Time, instance=_Total)
or
Nov 4 08:58:18:091 [8516] cdm: perfGetValue - Counter % Processor Time
Nov 4 08:58:18:091 [8516] cdm: perfGetValue - Counter found! This is the one we are after, find value...
Nov 4 08:58:18:091 [8516] cdm: DisplayCounter
Nov 4 08:58:18:091 [8516] cdm: DisplayCounter - Found '5.5958'
Nov 4 08:58:18:091 [8516] cdm: Value of Processor Time = 5.5958 for Processor
Nov 4 08:58:18:091 [8516] cdm: perfGetValue (object=Processor, counter=% User Time, instance=_Total)
or
Aug 24 23:49:13:241 [8244] cdm: CheckCpuInfo
Aug 24 23:49:13:241 [8244] cdm: SetSources
Aug 24 23:49:13:241 [8244] cdm: SetSources - group = no, alarm source = default, QoS source = default
Aug 24 23:49:13:241 [8244] cdm: GetCpuInfo(300 1)
Aug 24 23:49:13:241 [8244] cdm: Fetching NT cpu usage
Aug 24 23:49:13:241 [8244] cdm: perfTakeSample (remember=1)
Aug 24 23:49:13:241 [8244] cdm: perfTakeSample (object=2 4 234 236 238 510)
Aug 24 23:49:13:340 [8244] cdm: perfGetValue (object=Processor, counter=% Processor Time, instance=_Total)
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Object 236: LogicalDisk
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Object 234: PhysicalDisk
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Object 238: Processor
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Object found!
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance 0
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance 1
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance 2
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance 3
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance _Total
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Instance found!
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Counter 6
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Counter % Processor Time
Aug 24 23:49:13:340 [8244] cdm: perfGetValue - Counter found! This is the one we are after, find value...
Aug 24 23:49:13:340 [8244] cdm: DisplayCounter
Aug 24 23:49:13:340 [8244] cdm: DisplayCounter - Found '4.6223'
Aug 24 23:49:13:340 [8244] cdm: Value of Processor Time = 4.6223 for Processor
Aug 24 23:49:13:340 [8244] cdm: perfGetValue (object=Processor, counter=% User Time, instance=_Total)
Listed below is an excerpt from the cdm.log which illustrates corrupt perfmon counters:
In the cdm.log, anytime you ONLY just numbers for counters and/or some showing strings, this indicates that some of the counters are corrupted.