

                             Measurement Tools

                                MEASTOOL.TXT


1.  Overview

    This file describes a number of tools that may be useful in 
    the measurement and analysis of Windows NT computers.  They 
    are documented briefly here and many are also mentioned in 
    Windows NT Workstation Resource Guide, Part 3, Optimizing 
    Windows NT.

2.  Directory Organization

    In addition to the measurement tools in this directory, there 
    are also directories for other types of tools, and for 
    certain specific tools:

        CntrTools  -  Utilities for downloading, exporting, and 
                        interpreting the Performance Monitor 
                        standard and extensible counters.
	    Logs       -  Performance Monitor logs of disk performance 
                        tests on stripe sets (without parity).
        LogTools   -  Tools for logging performance data in 
                        different formats.
        Meastool   -  Tools for measuring and analyzing the 
                        hardware and software components of 
                        computers running Windows NT.
        P5Ctrs     -  Extensible counters for monitoring Intel 
                        Pentium (P5) and Pentium Pro (P6) 
                        processors.
        Probe      -  A tool that lets you create a workload and 
                        test the response of your hardware and 
                        software to that workload. Also includes 
                        a file of ready-to-use sample tests.
        TotlProc   -  An extensible counter for precise measuring 
                        of processor usage. It is designed to 
                        measure how much processor time is used 
                        by processes launched by the system 
                        interrupt.

3.  Measurement Tools

    The following sections discuss the different tools.  The 
    sections are listed in alphabetical order by tool name.  For 
    those specific tools in the preceding list of separate 
    directories, see the individual directories for the 
    appropriate information text file.

    Clearmem.exe	        Pfmon.exe
    Cpustres.exe            Pmon.exe
    Datalog.exe             Profile.exe
    Drivers.exe     	    Pstat.exe
    Empty.exe               Pview.exe
    Heapmon.exe             Pviewer.exe
    Kill.exe                Setedit.exe
    Leakyapp.exe	        Tlist.exe
    Monitor.exe	            Top.exe
    Ntimer.exe              Vadump.exe
    Perfmtr.exe             Wperf.exe

                                
Note: Windows NT Workstation Resource Guide lists the wrong 
location for Perflog (Pdlcnfig.exe and Pdlsvc.exe). Perflog is in 
PerfTool\LogTools.  	

3.1.  CLEARMEM

    CLEARMEM is used to force pages out of RAM.  In Windows NT, the
    working sets are allowed to grow until memory pressure forces them
    to decline.  Running CLEARMEM twice will usually force most
    applications out of memory.  When CLEARMEM is run, the system will
    pause because of the flood of high priority activity.  To run CLEARMEM,
    the computer's paging file must be at least as large as its RAM.  If
    you are running Windows NT Server configured for "Maximize Throughput
    for Network Applications," (see " Windows NT", Chapter 6) then you might
    have to run CLEARMEM more than twice to reduce application working
    sets to the minimum.  Use Performance Monitor to check on progress.)

    Run Clearmem from the command line. At the prompt, type: clearmem


3.2   CPUSTRES

    Cpustress is a utility that consumes processor cycles 
    continuously by executing an endless loop. This enables you 
    to observe the performance of other components of your 
    system when the processor is nearly monopolized.

    Double-click the Cpustress icon to start it.

3.3   DATALOG

    DATALOG.EXE is the Data Logging Service.  The Data Logging Service
    is a Windows NT Service that performs the same function as the
    Performance Monitor Alert and Logging facility. The Data Logging
    Service is useful in remotely administering log files for large 
    numbers of computers.

    Do not run DATALOG.EXE directly. Instead, use Monitor.exe to 
    configure and run the Data Logging Service.


3.4   DRIVERS

    DRIVERS produces a summary table of the drivers currently loaded
    on the system. The format of this command is: drivers

    Run Drivers from the command line. At the prompt, type: drivers

3.5   EMPTY

    EMPTY frees the working set of a specified task or process. 
    Run Empty from the command line. At the prompt, type: 

        empty { PID | progname }


3.6   HEAPMON

    A tool that displays system heap information. 

    Run Heapmon from the command line. At the prompt, type: heapmon.


3.7  KILL

    KILL is a utility for stopping applications.  You can name an
    application by the name of its executable or by its Process ID.
    You can determine the Process ID from TLIST or PVIEW or Performance
    Monitor.  If you specify the name of the executable and more than
    one copy is running, all running copies are killed.

    Run Kill from the command line. At the prompt, type:

       kill { PID | progname }

3.8  LEAKYAPP

    LEAKYAPP allocates virtual memory continuously until all of the 
    system's memory has been allocated. Use Leakyapp to observe the 
    performance of system components and applications in a system 
    running with minimum available memory.

    Double-click the Leakyapp icon to start it.


3.9  MONITOR

    Monitor is the configuration tool for installing and controlling 
    the Data Logging Service (Datalog.exe).

    The Data Logging Service is a Windows NT Service that performs 
    the same function as the Performance Monitor Alert and Logging 
    facility. The Data Logging Service is useful in remotely 
    administering log files for large numbers of computers.


3.10  NTIMER

    NTIMER measures how long a program runs.  It shows Elapsed 
    Time (ETime), time in User Mode (UTime) and time in Privileged 
    Mode (KTime).  These are expressed in 
    hours:minutes:seconds.milliseconds.  Time is actually accurate
    only to the resolution of the timer, which is 10 milliseconds
    on both the x86 and MIPS architectures.

    Run Ntimer from the command line. At the prompt, type: 

        ntimer program.exe


3.11  PERFMTR

    PERFMTR is useful for watching a number of system performance
    numbers during system execution.  You can select from a
    number of different views of the system by entering a character
    from a list presented when PERFMTR starts.
    
    Run Perfmtr from the command line. At the prompt, type: perfmtr


3.12   PFMON

    This utility enables you to monitor the page faults that occur as 
    you run an application. Page Fault Monitor produces a running list 
    of hard and soft page faults generated by each function call by the 
    application.

    You can use this tool to trace the source and number of page faults 
    in a process. Page Fault Monitor can display the data, write it to a 
    log file, or both.

    Run Pfmon from the command line. At the prompt, type: pfmon


3.13  PMON

    PMON is useful for looking at a large number of memory statistics
    while Windows NT is running.  Much of the information in PMON is
    available in the Performance Monitor.  PMON displays the data
    in a more summarized form.

    Double-click the Pmon icon to start it.


3.14  PROFILE

    PROFILE is a sampling profiler that samples code execution and
    reports on which code portions execute most frequently.  PROFILE
    modifies the real-time clock interrupt rate so that interrupts occur
    at 1-millisecond intervals.  (This does not modify the rate at
    which the system is sampling process or usage for Performance
    Monitor, or the rate at which the system updates the real-time
    clock.)  When the interrupt occurs, the PROFILER examines the
    instruction pointer and increments a counter corresponding
    to the public symbol containing that location.  >Note< that static
    symbols are not public and therefore PROFILER will "bill" the next
    lower public symbol for the time spent in static functions.  The
    output appears in the file named "profile.out" in the current
    directory.  Caution: if a file of that name already exists, it will be
    overwritten.  You must link with switches -debug:full and 
    -debugtype:coff for PROFILE to see your symbols.

    Run Profile from the command line. At the prompt, type:

	 profiler <application command line>


3.15  PSTAT

    PSTAT dumps the current execution status of all the processes in 
    the system.

    Run Pstat from the command line. At the prompt, type: pstat


3.16  PVIEW

    Process Explode (Pview) is a convenient tool for monitoring 
    memory usage and threads of processes running on a Windows NT 
    system. It also lets you stop running processes.

    Double-click the Pview icon to start it.

3.17   PVIEWER

    Process Viewer is a tool that displays information about 
    processes running on Windows NT. It is similar to Process 
    Explode (Pview), but displays more commonly used information 
    in a format that is easier to read.

    Double-click the Pviewer icon to start it.

3.18  SETEDIT

    SETEDIT is a tool for editing Performance Monitor chart settings
    files.

    SETEDIT looks just like the Windows NT Performance Monitor, but
    when you edit a legend line it permits you to type in instance
    names.

    SETEDIT is particularly useful for locating instances within
    Performance Monitor log files.  Since you cannot select instances
    until they are alive at the start of the time window, mortal
    instances can be hard to find.  You can use SETEDIT to enter the
    the case-sensitive name of the instance into a settings file.
    When Performance Monitor opens the settings file, it can then
    locate the instance automatically.  Use File/Save As... to save your
    changes to settings files.

    Run Setedit from the command line. At the prompt, type:

        setedit [setfile.pmc]


3.19  TLIST

    TLIST shows the running processes and their Process IDs.

    Run Tlist from the command line. At the prompt, type: tlist


3.20   TOP

    TOP reveals the processes that are using the most processor 
    time. It displays a table of all processes running on the 
    system in descending order of their percentage of processor 
    time. The table is refreshed automatically.

    Double-click the Top icon to start it.

3.21  VADUMP

    VADUMP can be used to look within the address space of a process.
    It shows the state and size of each segment of virtual address
    space.  It can be used to make sure virtual address space is not
    over-allocated.  It serves as a hard copy of some of the information
    visible in PVIEW.  See Chapter 11 of "Optimizing Windows NT" for
    information on its output.  Take care to use CLEARMEM as noted in
    that chapter so that you do not count superfluous pages in your
    working set.

    Run Vadump from the command line. At the prompt, type: 

        vadump -m -o -p PID

    where PID is the decimal Process ID.

    (You can use Tlist, Pview, or Pviewer to find the process ID.

3.22  WPERF

    Wperf is a performance monitor with a simple interface. To 
    select counters in Wperf, click the Select menu.

    Double-click the Wperf icon to start it.
