Contents

PWatch HELP

Contents (this topic)

Description

Operation

Menus

Application Notes

PWatch  Version 1.0

PWatch is a shareware program.  The license price is $20 for unlimited usage on one computer.  If you keep and use this program, you are morally and legally obligated to purchase a license.  The license entitles you to all future releases of PWatch.

You may freely redistribute PWatch, as long as this file and all other files in the original distribution are included.  Source code (C++) is available for $40 and a written agreement not to use it for commercial purposes.

You may register and pay via Compuserve: GO SWREG.  Use registration ID 2544.

You may also send payment to the author at the following address:
Michael Cornelison
1806 Milmont Drive #185
Milpitas, CA  95035

If you have problems, questions, or suggestions, you may write me at the above address, use Compuserve Mail (76450, 2336), or FAX (408) 942-9180.


PWatch Description

PWatch is a utility program which reports the usage of NT system resources, both overall and on a per-process basis.  With PWatch, you can observe what resource amounts are being used by which processes, either at a particular moment, or averaged over long periods of time.

The following resources are monitored:
CPU time
system memory
page faults
disk operations,
disk IO data rates
disk IO time

A discription of these resources may be found under the topic Application Notes.


Operation

Launch PWatch like any other NT application.

Select the menu  File | Time Interval.  In the dialog box that appears, enter a sampling time interval, in seconds.  Use a value between 0.1 and 999 seconds.  This is the measurement period for the report.  Each time this period has elapsed, a new report is generated.  The report will show the average resource utilization per process, over this period of time.  If the period is small (e.g. < 1 second), the report will be frequently regenerated, and will constitute a "real-time" display of resource usage.

Use the menu  Report  to select from three report types.  The default report type is resources, which is the resource utilization report described above.  Two other report types are available.  The counter descriptions report displays a text description of the system objects and resource counters used in the resources report (these are the same as in the NT Performance Monitor utility).  The counter values report displays the current absolute values of all the resource counters used in the resources report.  These can be used to determine the total resource usage of the system, disks, or any running process, since the time of system or process startup.  See the topic Appplication Notes for more details.

Use the menu pause to temporarily suspend report regeneration.  The display will stay frozen at the last report.  You may use the menu snap to generate a new report at a chosen instant.  The interval of measurement will the the time since the previous report.   Use of the pause menu will change this menu item to resume.  Use resume to restore normal operation (new report generated every sample interval).


Menus

File
Time Interval	Set the periodic report update interval
Header Font	Set font used for report headers
Body Font	Set font used for report body
Open	Load setups from a file
Save	Save setups to a file
Quit	Quit the application
Snap	Generate updated report immediately, reflecting resources used since the last report update
Pause	Suspend automatic report update at each time interval (as set using the Time Interval menu)
Resume	Resume automatic report update
Report	Choose report type:
Counter Descr	Report resource counter descriptions
Counter Values	Report current resource counter values
Resources	Report resources used since last report update
Help	Display application help file (this file)


Application Notes

In order for the NT disk performance counters to be activated, you must run the following command from a console window:   diskperf -y
This need be done only once, and will persist over a system reboot.

Here is a brief description of the resources reported:

system resources
avail. KB	available system memory, kilobytes
cache KB	available file system IO cache, kilobytes
PF/sec	page faults per second
TF/sec	transition faults per second
disk resources
% busy	% time the disk is busy, 0 -100%
IO/sec	input + output, operations per second
KB/sec	input + output, kilobytes per second
process resources
% CPU	% CPU utilization for the single process
IO/sec	input + output, operations per second
KB/sec	input + output, kilobytes per second
PF/sec	page faults per second
memKB	working set (real memory used), kilobytes
Pri	process base priority

The report type Counter Descr contains more extensive descriptions of the object types (system, disk, process) and resource counters used for the other report types (these descriptions come from NT itself).  For a detailed explanation of the resource counters and the corresponding NT internals, refer to the book "Optimizing Windows NT" by Russ Blake, available from Microsoft Press.

If the NT system being reported is a large and busy one, there could be many more processes than would fit in a normal display window.  PWatch allows you to monitor those processes that are using significant resources, by keeping the "busyest" processes within whatever window size you allow for the display.  Processes will be added or deleted from the active window area as needed, to keep the busyest ones in the window.  Those that stay in the window, by virtue of consistently being among the busyest, will tend to stay fixed in their row positions, rather than jumping around with each report update.

Mysteries and Anomalies
There are some.  Any additional insights from users would be welcome.

Disk % busy is capped at 100%, because it can exceed this value if not.  For smaller values, it seems to be consistent with the values reported from the NT Performance Monitor application.

Process IO counts include mailbox, pipes, network, etc. in addition to disk IO.  There seems to be no way to segregate them.

Process IO/sec and KB/sec can be reported lower than actual, because of the complex NT file system, which may perform the IOs from cache, or shift the resource counts to an NT system process.

Counter Values Report

The huge numbers displayed by this report are raw performance counter values.  These counters show the total resources used since system startup, or process creation.  The units of measure have been set as follows:

Bytes:  1 = 1 byte
faults:  1 = 1 fault
disk busy counter:  1 = 1 microsecond of busy time
CPU counter:  1 = 1 microsecond of busy time