Optimizing Windows NT Measurement Tools 1. Overview This directory tree contains a number of tools which may be useful in the measurement and analysis of Windows NT computers. These are documented in the book "Optimizing Windows NT," and also briefly here. Throughout these readme files you will encounter the notation "..\*\". The "*" refers to the machine architecture: substitute i386, mips, or alpha depending on your needs. So if you are using an alpha computer, "..\*\" means the "..\alpha\" directory, or, "go to the parent directory of the current directory, and then to the sub-directory containing alpha binaries." 2. Directory Organization There are three architecture sub-directories: "i386" which contains the x86 executables, and "MIPS" which contains the MIPS executables. Depending on which platform you are on, you should add the corresponding directory to your path. Alternatively, you can copy the files from the corresponding directory into a directory on your path. There are also directories for certain specific tools: wap - Win 32 API Profiler logger - Win 32 API Logger p5ctrs - Perfmon Extension for Pentium Counters totlproc - Perfmon Extension for Total Processor Usage In additon, this directory contains apfcvt.txt, an information file about a GUI application for use with WAP and LOGGER. This is a 16-bit application which can be used on all architectures. 3. Measurement Tools The following sections discuss the different tools. The sections are listed in alphabetical order by tool name. For those tools in separate directories listed above, see the individual directories for the appropriate readme.txt file. 3.1. CLEARMEM CLEARMEM is used to force pages out of RAM. On 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.) Usage: clearmem 3.2. CTRLIST CTRLIST is used to produce a text file containing the Performance Monitor objects and counters together with their Explain text. The resulting file can be searched for rapid online access to counter details. Usage: ctrlist > output.fil 3.3. DATALOG DATALOG is a Performance Monitor service which provides unattended alerting and logging on a system. It is controlled by the MONITOR utility. For details, see "Optimizing Windows NT", Chapters 2 and 8. 3.4. FASTIMER FASTIMER is a library which is used by the WAP tool for high precision timing. You will need to be sure that the FASTIMER library is on yur path when running WAP. 3.5. 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. Usage: kill { PID | progname } 3.6. LODCTR LODCTR is used to load new objects, counters, and explain text into the Registry for use by performance monitors. See Chapter 13 of "Optimizing Windows NT" for complete instructions on its use. This utility is shipped with Windows NT 3.5 and is not on this set of floppy disks. 3.7. MONITOR MONITOR is a utility for controlling the DATALOG service. See DATALOG, above. 3.8. NTIMER NTIMER is used to determine 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. Usage: ntimer program.exe 3.9. 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. Usage: perfmtr 3.10. PMON PMON is useful for looking at a large number of memory statistics while Windows NT is running. All of the information in PMON is available in the Performance Monitor. But PMON displays the data in a more tailored form. Usage: pmon 3.11. PROFILE PROFILE is a sampling profiler which samples code excution 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 procesor 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. Beware: if a file of that name already exists, it will be overwritten. You must link with switches -debug:full and -dubugtype:coff for PROFILE to see your symbols. Usage: profiler 3.12. PVIEW PVIEW is a convenient tool for looking at processes on a Windows NT system. Usage: pview 3.13. REGINI REGINI is a utility for modifying the Windows NT Configuration Registry from information supplied in a text file. It is used to simplify the installation of Extensible Counters for Performance Monitor. Make sure it is on your path when installing these counters. For usage, refer to the readme.txt in the the .\p5ctrs or .\totlproc directories. 3.14. 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. Usage: setedit [setfile.pmc] 3.15. TLIST TLIST shows the running processes and their Process ID's. Usage: tlist 3.16. UNLODCTR UNLODCTR is used to remove performance monitoring objects, counters, and Explain text from the registry for extensible objects. If an object is being de-installed, its Performance Monitor support should be removed. Two successive runs of LODCTR without an intervening run of UNLODCTR will result in counters being installed that cannot easily be removed. This wastes space in the Registry. See Chapter 13 of "Optimizing Windows NT" for directions on running UNLODCTR. UNLODCTR is shipped with Windows NT 3.5 and is not contained on these floppy disks. 3.17. 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. Usage: vadump -m -o -p PID where PID is the decimal Process ID as indicated by TLIST. 3.18. WPERF WPERF is a simple performance monitor which has a different user interface from Performance Montior. It is preferable for some applications. Once you have started WPERF, you should enlarge the window it is using and double click on the chart surface to get to the menus. Usage: wperf [End of readme.txt.]