Diskperf Command

Last Edited

by

in

,

Diskperf is a command-line utility in Microsoft Windows that plays a crucial role in Performance Monitor, especially in older versions like Windows 2000. This utility is used to enable or disable disk performance counters for both logical and physical disks. Understanding Diskperf is key for those who require in-depth monitoring of their disk activities without causing undue system performance issues.

What is Diskperf Command?

Diskperf is a Microsoft Windows command for starting and stopping disk performance counters for Performance Monitor (System Monitor from Windows 2000). Counters for the objects Logical Disk (partition) and Physical Disk (drive) are disabled by default because a performance hit of a few percent can occur if they are enabled. You must run the diskperf command prior to monitoring disk activity with Performance Monitor.

On some disk subsystems, enabling these counters might produce a small decrease in system performance, so you should disable them when monitoring of the system is completed. You must reboot the system after running diskperf.

Diskperf

Syntax and Command Options

For a complete list of syntax and options for the Diskperf command, simply type diskperf /? into the command line.

  • diskperf -y: Enables all disk performance counters
  • diskperf -n: Disables all disk performance counters
  • diskperf -?: Shows the full syntax

Examples

Here are some practical examples of how to use Diskperf:

  • To enable disk performance counters: diskperf -y
  • To disable disk performance counters: diskperf -n

After running any of these commands, a system reboot is necessary for the changes to take effect.

Performance Implications

As mentioned earlier, enabling disk performance counters might slightly reduce system performance. Hence, it’s generally advised to disable them once you have finished monitoring disk activities.

Modern Alternatives

While Diskperf is a tool of yesteryears, modern versions of Windows come with more advanced performance monitoring solutions that offer more features and require less manual intervention. However, knowing Diskperf can be beneficial for those working with legacy systems or for educational purposes.

Search