The Windows 2000 Resource Kits contain Ntimer.exe, which will time your applications
and server processes. To use it:
ntimer \[-1 -f -s\] imageName \[parameters\]...
where:
-1 displays the minimum output and is the same as using no switches.
-f displays the process page faults, total system interrupts, context switches and system calls.
-s indicates the name of the image is a server process and requires pressing CTRL+C to get the times.
imageName \[parameters\] is the executable or script you want to time and any parameters the process may require.
Sample usage and output
C:\>ntimer -l test.bat ContextSwitches - 3350 First level fills = 0 Second level fills = 0 ETime( 0:00:10.024 ) UTime( 0:00:00.010 ) KTime( 0:00:00.020 ) ITime( 0:00:09.984 ) C:\>ntimer -f test.bat ContextSwitches - 3350 First level fills = 0 Second level fills = 0 ETime( 0:00:10.024 ) UTime( 0:00:00.010 ) KTime( 0:00:00.020 ) ITime( 0:00:09.984 ) Process PageFaultCount 263 Total Interrupts 1131 Total Context Switches 3350 Total System Calls 11177where:
ETime is the elapsed time.
UTime is the time in User Mode.
KTime is the time in Kernel (Privileged) Mode.
ITime is idle time.
NOTE: All times are expressed in hours:minutes:seconds.milliseconds, but it is only accurate the the resolution of the timer, 10 milliseconds on x86 architecture.
NOTE: if you wish to record the time in a file:
C:\>ntimer -f test.bat > <Drive:>\Folder\test.log
or
C:\>ntimer -f test.bat >> <Drive:>\Folder\test.log