Frage

In installed the New Relic server monitor on a few servers, and for some reason I cannot figure out, some of the servers are not reporting back data about the processes on the server.

I tried setting the logging level to VERBOSE, which gave me a little info. Right after the entry about collecting processes, which seems to be able to count the number of processes, this entry is logged what seems the amount of times that matches the number of processes:

VERBOSE NewRelic.ServerMonitor.Service - FirstChanceException event raised in NewRelic.ServerMonitor.exe System.Management.ManagementException: Invalid class at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

As far as I can tell, this is related to either some missing performance counters, or some sort of WMI related error, but I have no clue how to solve this.

Has anyone run in to this issue before?

War es hilfreich?

Lösung

This indicates that the "Win32_PerfRawData_PerfProc_Process" class does not exist in WMI. This is usually caused by performance counters being disabled. In this case, it is turned off for gathering performance data for processes. This can be confirmed by using the Registry Editor to locate the key "Disable Performance Counters" located in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PerfProc\Performance.

This setting may not be there at all. That is not a problem. However, if it is there it must be set to 0. Update this value to be 0 and then reboot (probably needed but not sure).

Here's a PowerShell script that does this. Be sure to back up your registry before making any changes.

$value =(Get-Itemproperty hklm:SYSTEM\CurrentControlSet\services\PerfProc\Performance)."Disable Performance Counters"

If ($value -ne 0)
{
   Set-ItemProperty -Path hklm:SYSTEM\CurrentControlSet\services\PerfProc\Performance -Name "Disable Performance Counters" -Value 0 
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top