Auto Light Dark
Auto Light Dark

Agentless Troubleshooting for Missing Performance Counter

Overview

Cloudamize relies on Windows performance counters on target servers to collect accurate usage metrics for CPU, memory, storage, and networking. If these performance counters become corrupted, the Agentless Data Collector (ADC) cannot query or retrieve performance metrics remotely via WMI/WinRM. In these scenarios, Cloudamize defaults to sizing hosts based on allocated hardware specifications. To obtain performance-based sizing recommendations, the underlying performance counter corruption on the target Windows server must be repaired.

Remediation Options

Repairing corrupted Windows Performance Counters can be done in one of two ways: Option A: Rebuild the Counters (a quick fix using a short set of commands) or Option B: Manual Fix (a step-by-step process).

Administrative Privilege Required

Run steps 1 to 3 on the affected server in an elevated Command Prompt, and step 4 on the machine where the Agentless Data Collector is installed, in PowerShell run as administrator.

Option A: Rebuild the Counters

For a quick fix, run the following commands on each affected server in an elevated Command Prompt (Run as administrator):

Before you begin: check for disabled counters

Rebuilding the counters does not re-enable counters that have been disabled, so check for this first. On the affected server, list the performance counter providers and their status:

lodctr /Q

In the output, look for any provider whose performance counters show as Disabled. If you find one, enable it by running the following command, replacing <CounterName> with the provider name shown in brackets in the output (for example, PerfOS):

lodctr /e:<CounterName>

Then continue with step 1 below. If no providers show as disabled, you can go straight to step 1.

Fix steps (on each server, in a Command Prompt run as Administrator):

  1. Rebuild the performance counters, both 64-bit and 32-bit, and resync them with WMI:

    cd /d C:\Windows\System32
    lodctr /R
    cd /d C:\Windows\SysWOW64
    lodctr /R
    winmgmt /resyncperf
    
  2. Restart the WMI Performance Adapter service:

    net stop wmiApSrv
    net start wmiApSrv
    
  3. If data still doesn’t arrive, restart the WMI service. The safest option is to reboot the affected server. If a reboot isn’t possible, you can restart WMI manually, but we recommend doing it during a maintenance window. The net stop winmgmt /y command also stops every service that depends on WMI, and those services do not restart on their own.

    net stop winmgmt /y
    net start winmgmt
    
  4. On the machine where the Agentless Data Collector is installed (not the affected server), restart the Cloudamize Agentless Data Collector services. Open PowerShell as Administrator and run: Get-Service -DisplayName "Cloudamize*" | Restart-Service
    Then, from the same collector machine, check that it can read the counters from the affected server:
    typeperf -s <server> "\Processor(_Total)\% Processor Time" -sc 3
    Replace <server> with the name or IP address of the affected server. If this returns three values, the collector should be able to read the counters too.

Option B: Manual Fix (Step-by-Step)

If you prefer to execute and verify each diagnostic command manually, follow these steps in sequence.

The manual solution is recommended if Option A (Rebuild the Counters) does not resolve the issue. This process involves verifying that performance counters are not disabled in the Windows Registry and manually rebuilding the performance counter library values.

Manually Rebuild Performance Counter Library Values (Server 2008 and 2008 R2)

Manually Rebuild Performance Counter Library Values

If you have any queries, please get in touch with the helpdesk via our Helpdesk Portal or by email at helpdesk@cloudamize.com.