
                                 TOP V2.14

                                    by

                              Paul Ratcliffe
                               (c) Jan. 2018


TOP, PLIST and PKILL 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.



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 semi-documented OS/2 call DosQuerySysState. 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).
TOP measures the amount of time a process used in the current monitoring
period relative to all other displayed processes.
The system idle time is not taken into consideration.

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 press Enter to display the thread
information for that process, press Ctrl-K to attempt to kill it, or press
Ctrl-F to attempt to force kill it (this requires XF86SUP.SYS or CADH.SYS
to be installed - if not, if falls back to a normal kill).

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 DosQuerySysState, 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.



PKILL

PKILL is a process killer tool. It takes one or two parameters. The first is
an optional "-9" switch used to select force kill rather than normal kill.
(Force kill requires a support driver such as XF86SUP.SYS or CADH.SYS to be
installed. If not, then this option falls back to normal kill.)
The second is 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 of killing the wrong process (e.g. PMSHELL or CMD).



CPU

CPU is a simple utility that display the CPU Busy, Interrupt and Idle loads
as a percentage, for each CPU, once a second. There are no command line
parameters.



CPUSPEED

CPUSPEED is a simple utility that aims to determine the clock speed for
each CPU. There are no command line parameters.



HISTORY

Version 2.14  06-01-18
  Added ability to use CADH.SYS for force kill option.

Version 2.13  25-10-14
  Added usage information for force kill option to PKILL.

Version 2.12  20-10-14
  Added force kill options.

Version 2.11  03-09-06
  Added CPU and CPUSPEED utilities.
  Fixed buffer overruns with large screen widths > 132 characters.
  Increased process list size from 256 to 2048.

Version 2.10  03-08-04
  Changed to use 32 bit DosQuerySysState() API rather than 16 bit
  DosQProcStatus().
  Added option to PLIST and TOP to exclude "system" processes.
  Addedd parent PID to TOP's Process Details display.
  Fixed bugs in TOP to do with display sizes other than 80x25.
  Fixed bug where PID 1 is identified as VDM rather than SYSINIT.
  Changed TOP's kill keystroke from K to Ctrl-K.
  Cosmetic tidying of some columns on the display in TOP and PLIST.
  PMEM and OS2MEMU stuff removed as it no longer works on modern kernels.

Version 2.01  26-04-99
  Modification to allow the Q key to exit the program from most menus.

Version 2.0  04-04-99
  Complete rewrite from original TOP 0.91 sources by Ian Hargreaves.


OTHER

This program was developed under Warp 4 (without Win-OS/2) using VisualAge
C++ 3.0 for OS/2.

If you have any comments, criticisms, bug reports or anything that could be
improved then please let me know.
I will reply to all messages received (remove the numbers from the address).

Paul Ratcliffe: Internet: utils@orac12.clara34.co56.uk78
