Windows processes over WinRM (win_process)
Counts the Windows processes whose image name, or whose command line, matches a pattern, and reports their summed working set and their CPU use between two polls. It reads Win32_Process and the raw process performance counters (Win32_PerfRawData_PerfProc_Process) over WinRM. By default no matching process is an error, so it watches that a program is running. It is the Windows counterpart of ssh_process.
Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the queries and the result are the same. The target is then set up as in the WMI setup guide instead.
What it looks like

The sensor's page after a few polls, counting lsass.exe on a Windows Server domain controller reached over WinRM. CPU is unknown for the first poll, which only takes the starting reading. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
count | Matching processes | none | error below 1 |
cpu_pct | CPU share | % | none |
working_set_bytes | Working set | B | none |
cpu_pct is the share of one processor the matching processes used between the previous poll and this one, summed. Two busy threads of one process, or two busy processes, can therefore show more than 100, up to 100 times the number of logical processors. It is unknown for the first poll, which only takes the starting reading, and it is 0 when no process matches. A process that started since the previous poll has no earlier reading and is left out of the sum; the message says how many were counted. A process id that Windows has given to a new process is never compared with the old one.
To limit a count from above (a program that must run once, not twice), set warn_max or error_max on the sensor. To allow zero, clear the default limit.
working_set_bytes is the physical memory the processes hold now, summed. Memory shared between processes, the code of a DLL for example, is counted in each of them.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
match_by | required | name: the image name, compared exactly and without regard to case (sqlservr.exe, with the extension, as Task Manager's Details tab shows it). name_pattern: a regular expression searched in the image name. command: a regular expression searched in the whole command line, or in the image name for the few processes that have none (System). |
pattern | required | The name, or the regular expression (Rust syntax; case is ignored unless the expression says (?-i)). 1 to 300 characters. An image name cannot hold `\ / * ? < > |
port | 5985, or 5986 with https | TCP port of the WinRM listener. |
https | false | Use the HTTPS listener instead of HTTP with message encryption. |
accept_self_signed | false | Accept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough. |
Suggested interval: 60 seconds. Credential: Windows.
A regular expression is applied to the process list on the Probeward side and is never put into a query. An exact name is: it goes into WHERE Name='...' as one string literal with its backslashes and quotes escaped, so the target sends only those processes. The performance counters are always read for every process, because the counter instances are named svchost#12 and cannot be matched to a process by name.
Command lines can hold secrets. With command they are read and matched in memory, and nothing of them is stored, shown or put into a message or an event; only your pattern is. Prefer name or name_pattern where they are enough.
The query is answered by a WMI provider host (WmiPrvSE.exe), so a pattern that matches that name counts the host that is answering the poll as well.
On the target
WinRM enabled and an account set up as in the WinRM setup guide, including membership of Performance Monitor Users for the CPU counters. If the counters are missing or damaged (lodctr /R rebuilds them) the sensor still reports the count and the memory, leaves the CPU unknown and says why in the message.
Failures
The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:
| Message | Meaning |
|---|---|
Win32_Process returned no processes (kind protocol) | A pattern was used and WMI listed nothing, which no running machine does: the account may not read processes, or WMI is damaged. With an exact name an empty answer is a count of zero. |
CPU unavailable: ... in the message of a successful poll | The performance counter class could not be read; the count and memory are still reported. |