Skip to content

Windows CPU load over WinRM (win_cpu) ​

Reads the raw processor time counters (Win32_PerfRawData_PerfOS_Processor) over WinRM and reports the average load across all processors between the previous poll and this one.

Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the query and the result are the same. The target is then set up as in the WMI setup guide instead.

What it looks like ​

The page of a win_cpu sensor in the light theme

The sensor's page after a few polls, watching a Windows Server domain controller reached over WinRM. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.

Channels ​

KeyNameUnitDefault limits
cpu_pctCPU load%warning above 85, error above 95
core_max_pctBusiest processor%none; only with per_core
core_min_pctLeast busy processor%none; only with per_core

Parameters ​

ParameterDefaultMeaning
per_corefalseAlso report the busiest and the least busy processor, and list every processor in the message.
port5985, or 5986 with httpsTCP port of the WinRM listener.
httpsfalseUse the HTTPS listener instead of HTTP with message encryption.
accept_self_signedfalseAccept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough.

Suggested interval: 60 seconds. Credential: Windows. Discovery adds it to every Windows host.

How the load is worked out ​

The formatted counter classes need two samples inside one WMI session, and every poll is a new session, so they would read 0 or 100. The sensor keeps the raw idle time and its timestamp from each poll instead. The first poll after the sensor is created only takes that starting reading, and its value is unknown (first reading of N processor(s) taken; the load is known from the next poll). After the machine restarts the counters go back to zero and the next value is unknown again for the same reason.

On the target ​

WinRM enabled and an account set up as in the WinRM setup guide. Reading performance counters needs membership of Performance Monitor Users as well as the WMI rights.

Failures ​

The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:

MessageMeaning
Win32_PerfRawData_PerfOS_Processor returned no _Total instance (kind protocol)The performance counters are not available to the account, or the counter library is damaged (lodctr /R rebuilds it).

AGPL-3.0-only