Skip to content

DISKPERF Windows command

The Windows diskperf command is a utility that allows users to enable or disable the collection of performance counters for physical and logical disks on a Windows system. By default, disk performance counters are enabled, but users can use the diskperf command to turn them off if needed. This command can be particularly useful for troubleshooting disk performance issues or monitoring system performance over time. The diskperf command can be run from the Command Prompt and offers various options for managing disk performance counters. It is important to note that changing the status of disk performance counters may require administrative privileges.

DISKPERF Syntax:

Terminal window
diskperf [start | stop] [LogicalDisk]

Windows DISKPERF Options:

OptionDescription
startStarts the disk performance counters.
stopStops the disk performance counters.
LogicalDiskSpecifies a logical disk to start or stop.

DISKPERF Parameters:

ParameterDescription
startStarts collecting performance data.
stopStops collecting performance data.
LogicalDiskThe specific logical disk to collect data.

How to use DISKPERF command:

Enable Disk Performance Counters

Terminal window
diskperf -Y

Enables system wide disk performance counters.

Disable Disk Performance Counters

Terminal window
diskperf -N

Disables system wide disk performance counters.

Display Disk Performance Counter Status

Terminal window
diskperf -YX

Displays the current status of disk performance counters.

Enable Disk Performance Counters for Specific Drives

Terminal window
diskperf -Y C:

Enables disk performance counters for the specified drive (e.g., drive C).

Disable Disk Performance Counters for Specific Drives

Terminal window
diskperf -N D:

Disables disk performance counters for the specified drive (e.g., drive D).

Enable Disk Performance Counters and Include Logical Drives

Terminal window
diskperf -YL

Enables disk performance counters for logical drives as well.

Display Disk Performance Counters Help Information

Terminal window
diskperf -?

Displays help information and usage guidelines for the diskperf command.

Enable Disk Performance Counters and Include Volume Performance Counters

Terminal window
diskperf -YV

Enables disk performance counters and includes volume performance counters.

How do I use diskperf in CMD?

To use the diskperf command in CMD, execute the following command:

Terminal window
diskperf --y

What is the purpose of the diskperf command?

The diskperf command is used to enable or disable the disk performance counters on a Windows system.

How can I enable disk performance counters in CMD?

You can enable disk performance counters in CMD by running the following command:

Terminal window
diskperf -y

How can I disable disk performance counters using the diskperf command?

To disable disk performance counters using the diskperf command, you can use the following syntax:

Terminal window
diskperf -n

How do I check the current status of disk performance counters?

To check the current status of disk performance counters in CMD, you can use the following command:

Terminal window
diskperf -s

Can I reset the disk performance counters using diskperf?

Yes, you can reset the disk performance counters using the diskperf command by running:

Terminal window
diskperf -r

How can I log disk performance data with diskperf?

To log disk performance data using diskperf in CMD, you can execute the following command:

Terminal window
diskperf -yd

What is the command to display the disk performance data log settings?

To display the disk performance data log settings using the diskperf command, you can use the following syntax:

Terminal window
diskperf -yd

Can I set a specific sampling interval for disk performance data logging with diskperf?

Yes, you can set a specific sampling interval for disk performance data logging using diskperf in CMD by running the following command:

Terminal window
diskperf -yd -t 5

Applications of the DISKPERF Command

  • Enable performance counters for physical and logical disks.
  • Enable performance counters for all disks on the system.
  • Disable performance counters for all disks on the system.
  • Display the current state of disk performance counters.
  • View the command syntax and parameters for the DISKPERF command.