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 executed using either an Automatic Script or a Manual Step-by-Step Process.

Administrative Privilege Required

All steps must be executed directly on the affected target Windows server using an elevated Command Prompt or PowerShell session running as Administrator.

Option A: Automatic Fix (PowerShell Script)

For quick deployment across multiple servers or automated execution, run the following unified PowerShell snippet as an Administrator:

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 as well. A reboot is the simplest way: net stop winmgmt /y also stops services that depend on WMI, and they don’t restart automatically.

    net stop winmgmt /y
    net start winmgmt
    
  4. Restart the Cloudamize Agentless Data Collector services in PowerShell as Administrator: Get-Service -DisplayName "Cloudamize*" | Restart-Service

  5. Optional check: typeperf "\Processor(_Total)\% Processor Time" -sc 3 should print three values.

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 the automatic script 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.