Introduction to Windows Performance Monitor on Windows Server 2019
Windows Performance Monitor (perfmon) is a built-in Windows Server 2019 tool that provides real-time and historical monitoring of hundreds of system performance counters, including CPU, memory, disk, network, and application-specific metrics. Perfmon supports Data Collector Sets for capturing performance data over time, which is invaluable for capacity planning, troubleshooting performance bottlenecks, and establishing performance baselines. The tool integrates with the Windows Performance Diagnostic Console and can export data to CSV, binary log files, or SQL Server databases for external analysis. This guide covers launching perfmon, adding counters, creating Data Collector Sets, analyzing reports, and automating data collection.
Launching and Navigating Performance Monitor
Launch Performance Monitor from the Start menu by searching for perfmon, from the Run dialog with perfmon.exe, or via Server Manager at Tools > Performance Monitor. The console opens with a real-time graph of the %Processor Time counter for the local machine. The left pane shows three main sections: Monitoring Tools (real-time and log replay), Data Collector Sets (scheduled data collection), and Reports (viewing collected data).
The real-time graph under Performance Monitor > Monitoring Tools > Performance Monitor auto-refreshes every second by default. Right-click the graph area and select Properties to change the refresh interval, color scheme, and scale. Add multiple counters to compare related metrics simultaneously.
Adding Performance Counters
Click the green plus (+) button in the toolbar to open the Add Counters dialog. Select a performance object from the Available Counters list — for example, Processor, Memory, LogicalDisk, or Network Interface. Select specific counter instances (for multi-core CPUs, select individual cores or _Total for the aggregate) and click Add.
Key counters for Windows Server 2019 baseline monitoring:
CPU: Processor > % Processor Time (_Total and per core). Memory: Memory > Available MBytes, Memory > Pages/sec (high values indicate excessive paging to disk). Disk: LogicalDisk > % Disk Time, LogicalDisk > Avg. Disk Queue Length (values above 2 suggest disk saturation), LogicalDisk > Disk Bytes/sec. Network: Network Interface > Bytes Total/sec. System: System > Processor Queue Length (values above 10 indicate CPU contention). For IIS servers: Web Service > Current Connections, Web Service > Bytes Sent/sec. For SQL Server: SQL Server:Buffer Manager > Buffer Cache Hit Ratio, SQL Server:SQL Statistics > Batch Requests/sec.
Adding Counters via PowerShell
PowerShell provides a scriptable interface to Windows performance counters via the Get-Counter cmdlet. To retrieve the current value of a specific counter:
Get-Counter -Counter "Processor(_Total)% Processor Time"
To retrieve multiple counters at once:
Get-Counter -Counter "Processor(_Total)% Processor Time", "MemoryAvailable MBytes", "LogicalDisk(C:)% Disk Time"
To sample a counter repeatedly for performance monitoring (every 2 seconds for 30 samples):
Get-Counter -Counter "Processor(_Total)% Processor Time" -SampleInterval 2 -MaxSamples 30 | Select-Object -ExpandProperty CounterSamples | Select-Object Timestamp, CookedValue
To list all available performance counters on the system:
Get-Counter -ListSet * | Select-Object CounterSetName, CounterSetType | Sort-Object CounterSetName
Creating a Data Collector Set
Data Collector Sets (DCS) automate performance data collection over time. They are essential for baseline analysis and long-term capacity planning. In perfmon, expand Data Collector Sets > User Defined. Right-click and select New > Data Collector Set. Name it (for example, WS2019-Baseline-30min) and select Create manually. Choose Performance Counter as the data type, click Next, and add the counters you want to capture. Set the sample interval to 60 seconds for long-term collection or 5 seconds for short-term troubleshooting.
Choose where to save the data — the default location is %systemdrive%PerfLogsAdminDCSName. Set the output format to Binary for most use cases (it supports viewing in perfmon) or CSV for exporting to Excel or other tools.
Create a DCS via command line using logman:
logman create counter "WS2019-Baseline" -f bin -si 60 -o "C:PerfLogsWS2019-Baseline" -c "Processor(_Total)% Processor Time" "MemoryAvailable MBytes" "LogicalDisk(*)% Disk Time" "Network Interface(*)Bytes Total/sec" "SystemProcessor Queue Length"
Start the data collection:
logman start "WS2019-Baseline"
Stop it when done:
logman stop "WS2019-Baseline"
Scheduling Data Collector Sets
Right-click a Data Collector Set and select Properties to configure schedules. On the Schedule tab, add a schedule with a start date, start time, and expiry. To run the collection for a specific duration (for example, collect for 30 minutes starting at 2 PM), configure the Stop Condition tab to limit the collection to 30 minutes or a maximum file size.
For automated scheduled collection via command line:
logman create counter "WS2019-DailyBaseline" -f bin -si 30 -o "C:PerfLogsDailyWS2019-%date:~-4,4%%date:~-7,2%%date:~-10,2%" -c "Processor(_Total)% Processor Time" "MemoryAvailable MBytes" "PhysicalDisk(_Total)Disk Bytes/sec" -b 14:00 -e 14:30 -rf 00:30:00 -sch daily
Viewing and Analyzing Performance Logs
To replay a captured binary performance log in perfmon, navigate to Monitoring Tools > Performance Monitor, click the View Log Data button (the cylinder icon in the toolbar), and select the .blg file. The graph replays the historical data. Change the time range with the Properties dialog to zoom into specific time windows.
To convert a binary log to CSV for analysis in Excel or a script:
relog "C:PerfLogsWS2019-Baseline.blg" -f CSV -o "C:PerfLogsWS2019-Baseline.csv"
To extract specific counters from a log file:
relog "C:PerfLogsWS2019-Baseline.blg" -f CSV -o "C:PerfLogscpu-only.csv" -c "Processor(_Total)% Processor Time"
Using Performance Alerts
Perfmon Data Collector Sets support Alert type collectors that trigger actions when a counter exceeds or falls below a threshold. Create an alert via logman:
logman create alert "HighCPU-Alert" -si 60 -c "Processor(_Total)% Processor Time" -th "Processor(_Total)% Processor Time>90" -a "eventlog"
This writes a Windows Event Log entry whenever CPU utilization exceeds 90% for a 60-second sample interval. You can also configure the alert to run a program (such as a notification script) by changing -a to task and specifying a Task Scheduler task name.
Generating Performance Reports
Windows Server 2019 includes pre-built Data Collector Sets for generating system diagnostics reports. The System Performance set collects 60 seconds of data and produces a report identifying the top resource consumers and any detected performance issues:
logman start "System Performance"
Wait 60 seconds for data collection to complete, then view the generated report in perfmon under Reports > System > System Performance. The report includes CPU analysis, disk analysis, network analysis, and a summary of resource bottlenecks with recommendations. This is particularly useful as a quick first step when investigating a performance complaint on a Windows Server 2019 machine.