LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Troubleshooting Perfmon Access

Last updated on 03 October, 2024

Chances are that if you are an avid Windows user, you have probably come across the Perfmon utility at least once in your exploration of system and network monitoring.

Most of LogicMonitor’s Windows data collection uses WMI queries, but we do utilize Perfmon counters for our Windows SQL Server, Exchange (earlier versions), and SMTP DataSources. If you see gaps of No Data for these DataSources in particular, but the rest of your data collection (CPU, Disk, Memory, Ping, DNS metrics) is stable, then it is likely there is an issue with Perfmon on the monitored device.

Because Perfmon accesses performance counters from remote hosts, it is necessary that your collector services have Local Administrative privileges to access counters on your remote host if you are using a domain. If you are using a workgroup, your collector will need to be running under a user that has Local Administrative rights on the remote workgroup host that you are attempting to monitor.

NOTE: If the WMI credentials set for your device include a domain\user, but the remote computer is in a different domain, and the user is local, you may need to define pdh.user and pdh.pass properties to access Perfmon data.  If pdh.user and pdh.pass properties are defined on your device, they will be used over any WMI username and password properties defined for collecting Perfmon data.  

Perfmon Connection Timeouts & Latency

The most common symptoms seen when troubleshooting Perfmon instability are issues where Perfmon is having difficulty initiating a connection to a remote host. This must succeed between the collector and host in order for the LogicMonitorActive Discovery mechanism to detect which Perfmon performance counters are available on the remote host and to read data from the host.

After DataSource instances have been added to the host, Perfmon connectivity must continue to function in order for data collection to operate in a stable manner. If connectivity is interrupted after DataSource instances have been discovered, you will end up with blank or spotty graphs that are returning No Data.

To troubleshoot these connectivity issues:

  1. Remote into the collector machine under the user that your collector services are running under, and open a Run prompt > “perfmon.exe” to access the Perfmon GUI.
  2. Use the green “+” option to “Add” a new count.
  3. Specify the UNC path of your remote machine. When you are finished adding the path, Perfmon will pause while it automatically attempts to make a connection.
  4. If the connection is successful, you should be returned with a listing of all of the available Perfmon performance counters for your remote machine.
  5. If the connection fails, please attempt the same procedure from the local collector to itself, and from the local host to itself, to isolate the issue down to the host machine or the collector machine.

If you are unable to make a connection using the perfmon.exe utility on your collector to your remote host, the collector services will be unable to do so as well. This indicates an issue not with LogicMonitor, but with your Windows configuration or authentication.

Services & Dependencies

If WMI-based data collection succeeds, but Perfmon DataSources fail & you cannot get a connection established via the Perfmon utility, the issue may be that certain services need to be running on the host being monitored for Perfmon to respond to RPC queries.

The following services must be set to an Automatic startup type:

  • Remote Procedure Call (RPC)
  • Remote Registry

And the following services must set to Manual or greater startup type:

  • WMI Performance Adapter
  • Performance Counter DLL Host
  • Performance Logs and Alerts
  • Remote Procedure Call (RPC) Locator

Ports

Perfmon relies on inbound RPC port 135 TCP and Windows SMB port 445 TCP on the host. When troubleshooting Perfmon connectivity issues, please ensure that these ports are unrestricted in your firewall configuration.

Permissions

If the steps above do not resolve the issue and you suspect permission issues are to blame, you can work around this via regedit:

  1. Open regedit on the machine to which you are trying to connect to perfmon.
  2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Perflib.
  3. Right click on Perflib key and select permissions.
  4. Click Add and add Local Service with full control.
  5. Save and exit.
  6. Restart the Remote Registry Service.

Rebuilding Perfmon Performance Counters

If you happen to get a response via Perfmon utility and from the collector debug console, but you get an error similar to “Object Not Found” when you attempt to view a counter, try repairing the counters with the following commands:

  1. cd c:\windows\system32
  2. lodctr /R
  3. cd c:\windows\sysWOW64
  4. lodctr /R
  5. WINMGMT.EXE /RESYNCPERF
  6. A restart is advised, but if that is not possible:
  7. Stop and restart the Windows Management Instrumentation service (set to automatic if not already).
  8. Stop and restart the Performance Logs and Alerts service (set to automatic if not already).

Also, see SQL Server monitoring

For additional help with troubleshooting your Windows Perfmon data collection, please submit a support ticket or use the chat with engineer link.

In This Article