Technical article 127119

How can I use top to monitor activity on my SCO Unix Server?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.4

Written · Last revised

Problem

How can I use top to monitor activity on my SCO Unix Server?

Solution

top is a commandline tool which gives you a frequently-updated list of processes.

The top command is a very useful and powerful as it shows you which users and processes are consuming the most system resources at any given time.

You can download top from here:
OpenServer 6
============
ftp://ftp2.sco.com/pub/skunkware/osr6/vols/top-3.7Sa-VOLS.cpio
OpenServer 6 with min Maintenance Pack 3 required
Unixware 7
==========
ftp://ftp2.sco.com/pub/skunkware/uw7/Packages/top-3.5beta9.pkg
OpenServer 5
============
ftp://ftp2.sco.com/pub/skunkware/osr5/vols/top-3.5beta5-VOLS.tar
Some useful options:
# top -q -s 1 -o cpu 4

q = renice to -20. Runs faster s = update screen every second 4 = shows only 4 top processes o = Sort the process display area on the specified field

# top -s 1 -U joe 4
U = only processes for user joe

If you are a system administrator and you are monitoring systems on a regular base it's sometimes very helpful to get see when an issue shows up. top offers the environment variable TOPCOLORS which specifies colors to use and conditions for which they should be used.

The environment  variable is a sequence of color specifications,
separated by colons.
Each  specification takes the form tag=min,max#code

- tag is the name of the value to check - min and max specify a range for the value - code is an ANSI color code

You can see a list of color codes recognized by this installation of top with the -T option.

Available color tags
====================
1min 5min 15min header cpu.idle cpu.user cpu.kernel
cpu.wait memory.phys memory.used memory.free
memory.swapused memory.swapfree
Here some examples
==================
TOPCOLORS=cpu.idle=0,10#31
CPU idle between 0 and 10% should be displayed in red

TOPCOLORS=cpu.idle=,10#31:memory.used=211968,#31 CPU idle between 0 and 10% should be displayed in red If memory in use >= 207M display in red. Calculate as 1024*207

Some useful special characters while running top. N - sort by process id P - sort by CPU usage h - help page

From the Xinuos technical article database, record 127119. Reproduced with permission. The original is at www.sco.com/ta/127119, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.