How to Monitor Windows Server 2012 R2 with Performance Monitor

Performance Monitor (PerfMon) is the built-in diagnostic tool in Windows Server 2012 R2 for collecting, analysing, and logging performance data from the operating system, hardware, and applications. It provides real-time graphing of hundreds of performance counters covering CPU, memory, disk, network, and application-specific metrics. When combined with Data Collector Sets for long-term logging and Alerts for threshold-based notifications, Performance Monitor becomes a powerful capacity planning and troubleshooting platform available without any additional software licensing. This guide covers the full workflow from opening PerfMon to creating automated performance baselines and alerts.

Prerequisites

Administrator or Performance Monitor Users group membership is required to view and configure all counters. Performance Monitor is available on all editions of Windows Server 2012 R2. For remote monitoring, WMI and firewall rules allowing remote performance monitoring must be configured on target servers. Sufficient disk space is needed on the logging volume if long-duration Data Collector Sets will be used — a busy server can generate several hundred MB of performance data per hour.

Step 1: Open Performance Monitor

Launch Performance Monitor using one of the following methods:

perfmon.exe

Or from Server Manager, click Tools and select Performance Monitor. Alternatively, press Win+R and type perfmon. The Performance Monitor console opens with the default real-time counter (% Processor Time) displayed.

The left navigation pane contains three main sections: Performance Monitor (real-time graphing), Data Collector Sets (logging and alerting), and Reports (viewing collected data).

Step 2: Add Key Performance Counters

In the Performance Monitor view, click the green plus (+) button to add counters. The essential counter set for a Windows Server health baseline includes the following critical metrics. Add each from the Add Counters dialog:

CPU counters to monitor: Processor → % Processor Time (all instances), Processor → % Privileged Time, System → Processor Queue Length.

Memory counters: Memory → Available MBytes, Memory → Pages/sec, Memory → Pool Nonpaged Bytes.

Disk counters: PhysicalDisk → % Disk Time (all instances), PhysicalDisk → Avg. Disk Queue Length, PhysicalDisk → Disk Reads/sec, PhysicalDisk → Disk Writes/sec, PhysicalDisk → Avg. Disk sec/Read, PhysicalDisk → Avg. Disk sec/Write.

Network counters: Network Interface → Bytes Total/sec (per adapter), Network Interface → Output Queue Length.

To add counters via PowerShell for scripted monitoring:

# Get a list of all performance counter categories
Get-Counter -ListSet * | Select-Object CounterSetName | Sort-Object CounterSetName

# Sample CPU and memory counters every 5 seconds for 60 samples
Get-Counter -Counter "Processor(_Total)% Processor Time","MemoryAvailable MBytes","PhysicalDisk(_Total)% Disk Time" -SampleInterval 5 -MaxSamples 60 | Export-Counter -Path C:PerfDatabaseline.blg -FileFormat BLG

Step 3: Create a Data Collector Set for Baseline Logging

Data Collector Sets (DCS) capture performance data to log files for later analysis. Right-click Data Collector Sets in the left pane, select New → Data Collector Set. Name it “Server Baseline” and choose “Create manually (Advanced)”. Select Performance counter and specify a sampling interval of 15 seconds for a detailed baseline (increase to 60 seconds for long-duration monitoring to reduce log file size).

Add the full recommended counter set covering CPU, memory, disk, and network as described above. Set the log file location to a dedicated logging volume with sufficient free space (at least 5 GB). Under Schedule, configure the DCS to run continuously or during specific hours.

Create a DCS via PowerShell using logman:

logman create counter "ServerBaseline" -cf "C:PerfDatacounters.txt" -si 15 -f bincirc -max 500 -o "C:PerfDataBaseline" -rf 24:00:00

The counters.txt file contains one counter per line, for example:

Processor(_Total)% Processor Time
MemoryAvailable MBytes
MemoryPages/sec
PhysicalDisk(_Total)% Disk Time
PhysicalDisk(_Total)Avg. Disk sec/Read
PhysicalDisk(_Total)Avg. Disk sec/Write
Network Interface(*)Bytes Total/sec
SystemProcessor Queue Length

Start and stop the Data Collector Set:

logman start ServerBaseline
logman stop ServerBaseline

Step 4: Configure Performance Alerts

Performance Alerts notify administrators when counter values exceed defined thresholds. Under Data Collector Sets, right-click User Defined, select New → Data Collector Set, choose Create manually, and select Performance Counter Alert.

Common alert thresholds for production servers:

CPU: Alert if Processor(_Total)% Processor Time exceeds 90% for more than 5 minutes. Memory: Alert if MemoryAvailable MBytes drops below 512 MB. Disk queue: Alert if PhysicalDisk(_Total)Avg. Disk Queue Length exceeds 2. Page file: Alert if Paging File(_Total)% Usage exceeds 80%.

Configure the alert action to log to the Application event log and optionally run a script that sends an email notification. Use the Alert Task tab to specify a PowerShell script path that fires when the threshold is breached.

Step 5: Use PowerShell for Continuous Monitoring

PowerShell’s Get-Counter cmdlet enables real-time sampling and threshold alerting without the PerfMon GUI:

# Monitor CPU utilisation and alert if over 85%
while ($true) {
    $cpu = (Get-Counter "Processor(_Total)% Processor Time").CounterSamples[0].CookedValue
    $mem = (Get-Counter "MemoryAvailable MBytes").CounterSamples[0].CookedValue
    $diskQ = (Get-Counter "PhysicalDisk(_Total)Avg. Disk Queue Length").CounterSamples[0].CookedValue

    if ($cpu -gt 85) {
        Write-Warning "HIGH CPU: $([math]::Round($cpu,1))%"
    }
    if ($mem -lt 512) {
        Write-Warning "LOW MEMORY: $([math]::Round($mem,0)) MB available"
    }
    if ($diskQ -gt 2) {
        Write-Warning "DISK QUEUE HIGH: $([math]::Round($diskQ,2))"
    }
    Start-Sleep -Seconds 30
}

Step 6: Analyse Performance Reports

After collecting a baseline, view reports by navigating to Reports in the left pane of Performance Monitor. Select the Data Collector Set and then the specific log file. Use the Report view to see averaged values over the collection period, or switch to the Chart view for graphical analysis.

Open a binary performance log file (.blg) in Performance Monitor for offline analysis:

perfmon /sys /report "C:PerfDataBaseline_000001.blg"

Convert a binary log to CSV for import into Excel or a database:

relog "C:PerfDataBaseline_000001.blg" -f CSV -o "C:PerfDataBaseline.csv"

Step 7: Use the Resource Monitor for Real-Time Diagnosis

For real-time deep-dive analysis, Resource Monitor (resmon.exe) provides per-process visibility into CPU, memory, disk, and network activity. Launch it from Task Manager’s Performance tab or directly:

resmon.exe

Resource Monitor is particularly useful for identifying which process is consuming excessive I/O or causing high disk queue lengths — information that Performance Monitor alone does not break down at the process level.

Step 8: Monitor Remote Servers

Performance Monitor can collect data from remote servers. Add remote counters by specifying the server name in the Add Counters dialog using UNC format, for example \SQLSERVER01Processor(_Total)% Processor Time.

For scripted remote monitoring:

Get-Counter -ComputerName SQLSERVER01 -Counter "Processor(_Total)% Processor Time","MemoryAvailable MBytes" -SampleInterval 10 -MaxSamples 6 | Select-Object -ExpandProperty CounterSamples | Format-Table Path, CookedValue -AutoSize

Summary

Performance Monitor on Windows Server 2012 R2 provides a comprehensive, built-in framework for real-time monitoring, long-term baseline collection, and threshold-based alerting. By configuring Data Collector Sets with appropriate counter sets and sampling intervals, administrators can establish performance baselines, detect degradation early, and generate evidence for capacity planning decisions. Combined with PowerShell scripting for automated alerting and relog for data export and analysis, Performance Monitor remains an essential tool in every Windows Server administrator’s toolkit.