---
title: "How to monitor Windows performance counters"
description: "Monitoring Windows performance counters in op5 Monitor involves selecting and verifying counters using perfmon and command-line tools. The process includes adding a specific check-command and service to graph and track the desired performance data."
url: "https://docs.itrsgroup.com/docs/faq/op5/360020055254-op5-monitor-how-to-monitor-windows-performance-counters/index.html"
---
This "how-to" covers how to monitor and graph a Windows performance counter in op5 Monitor.

## **Monitoring the performance counter**

In perfmon, select a performance counter that you want to monitor and/or graph. In this example we monitor and graph the following performance counter:

Performance object: Terminal Services Session
Instance: Console
counter: Thread Count

Request the counter-value from command-line to verify access and to examine the returned data:

```
## /opt/plugins/check_nt -H 192.168.1.8 -v COUNTER -l "Terminal Services Session(Console)Thread Count"
```

```
20
```

(in this example the returned value is an integer with a value of 20)

To monitor this counter in op5 Monitor, just add the following check-command and service:

|  |  |
| --- | --- |
| command\_name: | check\_nt\_tsc\_threadcount |
| command\_line: | $USER1$/check\_nt -H $HOSTADDRESS$ -v COUNTER -l "Terminal Services Session (Console) Thread Count","TS Console Thread Count is: %.f" -w $ARG1$ -c $ARG2$ |
| service\_description: | Terminal Services Console Thread Count |
| check\_command: | check\_nt\_tsc\_threadcount |
| check\_command\_args: | 25!30 |


