I am looking at extracting disk IO statistics on Windows 2003 upon occurrence of some events, e.g. a long full GC occurring that is waiting a long time for CPU resource. I have read that Process Explorer allows you to do that, but it is a GUI based application, which entails that you must know when the problem will occur again and you a must already be logged into your server. However, because I do not know when it will happen, I need to write a script to output disk IO statistics when the last GC took more than x seconds.

Are there any such command line tools already available out there, such that I can simply call that program to output the results for me?

2 Answers 2


I am not sure about the exact type of data you are trying to collect, but all perfmon counter data is available via the typeperf command line utility even in Server 2003.

Sample use

List counters available (without instances):

typeperf -q

sample total CPU usage over 10 seconds once and return:

typeperf "Processor(_Total)\% Processor Time" -si 10 -sc 1

In general, all counters available through the perfmon GUI are also available through typeperf by the same name. Note that names may be localised on non-MUI systems.


The previous answer is good, but its example is for processor, not disk IO. Here is one for that:

typeperf -si 2 "\LogicalDisk(_Total)\Disk Bytes/sec"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .