home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
top201.zip
/
TOP.TXT
< prev
next >
Wrap
Text File
|
1999-04-25
|
5KB
|
145 lines
TOP V2.01
by
Paul Ratcliffe
(c) Apr. 1999
TOP, PLIST, PKILL and PMEM are a collection of programs for monitoring the
system CPU and memory usage and for querying and killing processes.
The program is E-mailware and as such:
USE OF THIS PROGRAM IS ENTIRELY AT YOUR OWN RISK.
LICENSE
TOP was originally written by Ian Hargreaves, and is now maintained by Paul
Ratcliffe.
The software and all associated files are copyrighted by Ian Hargreaves and
Paul Ratcliffe. You may copy this software for backup purposes. You may
also copy and share unmodified copies of the whole package, provided the
copyright notice is reproduced and included on all copies. Please let me
know if you plan to re-distribute TOP.
This software is E-mailware. Simply send a message to top@orac.clara.co.uk
and you can use this software for as long as you want. Please mention where
you got TOP from, and what version you are using.
TOP
This utility is similar to the Unix tool TOP. It displays a list of
processes and the amount of CPU time they are using. The amount of CPU is
calculated using the undocumented OS/2 call DosQProcStatus. This function
gives details for each thread on how much System (Kernel) time and how much
User (Application) time is being used.
TOP is NOT a load monitor - the statistics displayed are not real time,
they are the statistics for the previous monitoring period (default 2
seconds).
The load is calculated by comparing the amount of CPU that a process has
used in the current monitoring period, to the amount the same process used
in the last monitoring period.
A list of active processes is displayed and sorted according to the current
sort specification. This and many other options are configured in the text
file TOP.OPT, a sample of which is included, along with explanatory notes.
KEYBOARD CONTROLS
From the main menu, you can navigate through the program using the
Left/Right cursor keys or the initial letter of each menu option. The Enter
key is used as a Select key and the Escape key as a Cancel key.
On the pop up menus, the Enter key selects or deselects the option and
cancels the menu, whereas the Space key just selects the option.
The standard PgUp, PgDn, Home, End, Ctrl-Home and Ctrl-End keys can be used
to navigate the process list display.
Pressing the Up/Down cursor keys allows a particular process to be
selected. From this selection you can either press Enter to display the
thread information for that process, or press K to attempt to kill it.
Other keys are:
F1 - Display this help text
ESC - Return to previous menu
Q - Quit program
TECHNICAL INFORMATION
TOP uses 2 threads - one to process keyboard options, and the other one to
call DosQProcStatus, calculate CPU usage and display the results.
Both threads run at the default priority class and level and in total will
not impact system performance by any significant amount.
If you see figures where TOP appears to be using lots (>10%) of CPU, this
will be because you will probably have very few active processes running.
TOP is a VIO mode program. This means that if you increase the number of
lines that are available at the command prompt (using the MODE command),
TOP will use those extra lines to display more information.
Remember TOP is NOT a load monitor. Most load monitors work by having a
background thread run constantly to calculate CPU usage. TOP spends most of
its time sleeping between screen updates, during which time the CPU is free
to do other more useful stuff.
PLIST
PLIST is a process listing tool which displays much the same information as
TOP, but in a single shot operation rather than a continuous display.
The process list can be sorted in the same way as TOP by using a command line
switch. PLIST ? gives the options. The default is to do a reverse sort by
process ID.
PMEM
PMEM is a process memory usage listing tool. It requires OS20MEMU.DLL and
OS20MEMU.SYS to be installed. OS20MEMU is IBM EWS (Employee Written
Software) program, that breaks down memory usage by process.
The list can be sorted - PMEM ? gives the options. The default is a verbose
unsorted display.
PKILL
PKILL is a process killer tool. It takes one parameter - either a decimal
process ID, or part of a process name. If the same name appears more than
once in the process list, then PKILL will only kill the first... beware
killing the wrong process.
HISTORY
Version 2.01 26-4-99
Modification to allow the Q key to exit the program from most menus.
Version 2.0 4-4-99
Complete rewrite from original TOP 0.91 sources by Ian Hargreaves.
OTHER
This program was developed under Warp 3 (without Win-OS/2) using VisualAge
C++ 3.0 for OS/2.
If you use this program could you please let me know. Also if you have any
comments, criticisms, bug reports or anything that could be improved.
I will reply to all messages received.
Paul Ratcliffe: Internet: top@orac.clara.co.uk
Internet: paul.ratcliffe@bbc.co.uk