[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 5

topas Command

Purpose

Reports selected local system statistics.

Syntax

topas [ -d number_of_hot_disks ] [ -h ] [ -i monitoring_interval_in_seconds ] [ -n number_of_hot_network_interfaces ] [ -p number_of_hot_processes]

Description

The topas command reports selected statistics about the activity on the local system. The command uses the curses library to display its output in a format suitable for viewing on an 80x25 character based display or in a window of at least the same size on a graphical display. The topas command requires the perfagent.tools fileset to be installed on the system.

If the topas command is invoked without flags, it runs as if invoked with the command line:

topas -d5 -i2 -n2 -p16

The program extracts statistics from the system with an interval specified by the monitoring_interval_in_seconds argument. The output, as shown below, consists of a two fixed parts and a variable section. The top seven lines at the left of the display shows the name of the system topas runs on, the date and time of the last observation, and the monitoring interval. Following this is a section that lists the cpu utilization in numeric and block-graph format.

The second fixed part fills the rightmost 32 positions of the display. It contains five subsections of statistics, as follows:

EVENTS/QUEUES Displays the per-second frequency of selected system-global events and the average size of the thread run- and wait queues:
Cswitch
The number of context switches per second over the monitoring interval.
Syscalls
The total number of system calls per second executed over the monitoring interval.
Reads
The number of read system calls per second executed over the monitoring interval.
Writes
The number of write system calls per second executed over the monitoring interval.
Forks
The number of fork system calls per second executed over the monitoring interval.
Execs
The number of exec system calls per second executed over the monitoring interval.
Runqueue
The average number of threads that were ready to run but were waiting for a processor to become available.
Waitqueue
The average number of threads that were waiting for paging to complete.
FILE/TTY Displays the per-second frequency of selected file and tty statistics.
Readch
The number of bytes read per second through the read system call over the monitoring interval.
Writech
The number of bytes written per second through the write system call over the monitoring interval.
Rawin
The number of raw bytes read per second from TTYs over the monitoring interval.
Ttyout
The number of bytes written to TTYs per second over the monitoring interval.
Igets
The number of calls per second to the inode lookup routines over the monitoring interval.
Namei
The number of calls per second to the pathname lookup routines over the monitoring interval.
Dirblk
The number of directory blocks scanned per second by the directory search routine over the monitoring interval.
PAGING Displays the per-second frequency of paging statistics.
Faults
Total number of page faults taken per second over the monitoring interval. This includes page faults that do not cause paging activity.
Steals
Physical memory 4K frames stolen per second by the virtual memory manager over the monitoring interval.
PgspIn
Number of 4K pages read from paging space per second over the monitoring interval.
PgspOut
Number of 4K pages written to paging space per second over the monitoring interval.
PageIn
Number of 4K pages read per second over the monitoring interval. This includes paging activity associated with reading from file systems. By subtracting PgspIn from this value you get the number of 4K pages read from file systems per second over the monitoring interval.
PageOut
Number of 4K pages written per second over the monitoring interval. This includes paging activity associated with writing to file systems. By subtracting PgspOut from this value you get the number of 4K pages written to file systems per second over the monitoring interval.
Sios
The number of I/O requests per second issued by the virtual memory manager over the monitoring interval.
MEMORY Displays the real memory size and the distribution of memory in use.
Real,MB
The size of real memory in megabytes.
% Comp
The percentage of real memory currently allocated to computational page frames. Computational page frames are generally those that are backed by paging space.
% Noncomp
The percentage of real memory currently allocated to non-computational frames. Non-computational page frames are generally those that are backed by file space, either data files, executable files, or shared library files.
% Client
The percentage of real memory currently allocated to cache remotely mounted files.
PAGING SPACE Display size and utilization of paging space.
Size,MB
The sum of all paging spaces on the system, in megabytes.
% Used
The percentage of total paging space currently in use.
% Free
The percentage of total paging space currently free.
The variable part of the topas display can have one, two, or three subsections. If more than one appears, they are always shown in the following order:
Network Interfaces Lists the selected number of network interfaces. The interfaces are ordered after the activity over the monitoring interval. The interface that transferred most bytes (sum of bytes read and written) over the interval is listed first. For each network interface the following fields are displayed:
Interf
The name of the network interface.
KBPS
The total throughput in megabytes per second over the monitoring interval. This field is the sum of kilobytes received and kilobytes sent per second.
I-Pack
The number of data packets received per second over the monitoring interval.
O-Pack
The number of data packets sent per second over the monitoring interval.
KB-In
The number of kilobytes received per second over the monitoring interval.
KB-Out
The number of kilobytes sent per second over the monitoring interval.
Physical Disks Lists the selected number of physical disks. The disks are ordered after the activity over the monitoring interval. The interface that was most busy over the interval is listed first. For each disk the following fields are displayed:
Disk
The name of the physical disk.
Busy%
Indicates the percentage of time the physical disk was active (bandwidth utilization for the drive).
KBPS
The number of kilobytes read and written per second over the monitoring interval. This field is the sum of KB-Read and KB-Read.
TPS
The number of transfers per second that were issued to the physical disk. A transfer is an I/O request to the physical disk. Multiple logical requests can be combined into a single I/O request to the disk. A transfer is of indeterminate size.
KB-Read
The number of kilobytes read per second from the physical disk.
K -Writ
The number of kilobytes written per second to the physical disk.
Processes Lists the selected number of processes or as many as will fit on the display. The processes are ordered after their cpu usage over the monitoring interval. The process that consumed the most cpu over the interval is listed first. For each process the following fields are displayed:
Name
The name of the executable program executing in the process. The name is stripped of any pathname and argument information and truncated to 9 characters in length.
Process ID
The process ID of the process.
% CPU Utilization
The average cpu utilization of the process over the monitoring interval. The first time a process is shown, this value will be the average cpu utilization over the lifetime of the process.
Paging Space Used
The size of the paging space allocated to this process. This can be considered an expression of the footprint of the process but does not include the memory used to keep the executable program and any shared libraries it may depend on.
Process Owner
The user name of the user that owns the process.

Sample Output

The following is an example of the display generated by the topas command:

    Topas Monitor for host:    niller               EVENTS/QUEUES    FILE/TTY
    Mon Mar  1 07:00:27 1999   Interval:  2         Cswitch     383  Readch   504233
                                                    Syscall    2421  Writech   86445
    Kernel   35.0   |##########                  |  Reads       254  Rawin         0
    User     39.5   |###########                 |  Writes       44  Ttyout      354
    Wait     22.5   |######                      |  Forks         7  Igets         8
    Idle      3.0   |#                           |  Execs         7  Namei       281
                                                    Runqueue    2.0  Dirblk       72
    Interf   KBPS   I-Pack  O-Pack   KB-In  KB-Out  Waitqueue   1.0
    tr0        0.0     0.5     0.5     0.0     0.0
    lo0        0.0     0.0     0.0     0.0     0.0  PAGING           MEMORY
                                                    Faults     1901  Real,MB     384 
    Disk    Busy%     KBPS     TPS KB-Read KB-Writ  Steals        0  % Comp     15.0
    hdisk0   27.5    110.0    25.5     0.0   110.0  PgspIn        0  % Noncomp  42.3
    hdisk1    0.0      0.0     0.0     0.0     0.0  PgspOut       0  % Client    0.0
    hdisk2    0.0      0.0     0.0     0.0     0.0  PageIn        0
                                                    PageOut      27  PAGING SPACE
    xlcentry (56328)  5.0% PgSp: 0.5mb nchris       Sios         25  Size,MB     512
    X        (2692)   4.0% PgSp:30.8mb root                          % Used     25.5
    cc       (56794)  2.0% PgSp: 0.1mb nchris                        % Free     74.5
    i4lmd    (21418)  1.5% PgSp: 0.5mb root  
    java     (31246)  1.5% PgSp: 5.4mb nchris
    topas    (50452)  1.5% PgSp: 0.5mb nchris          Press "h" for help screen.
    make     (53914)  1.0% PgSp: 0.2mb nchris          Press "q" to quit program.
    syncd    (4662)   0.0% PgSp: 0.0mb root

Flags

-d Specifies the maximum number of disks shown. If this number exceed the number of disks installed, the latter is used. If this argument is omitted a default of 5 (five) is assumed. If a value of zero is specified, no disk information will be displayed.
-h Displays help information in the following format:
usage:  topas   [-d number-of-hot-disks]
                [-h show help information]
                [-i monitoring-interval_in_seconds]
                [-n number-of-hot-network-interfaces]
                [-p number-of-hot-processes]

One-character commands:
        a       Show all
        d       Show disks (and more if space allows)
        h       Show help screen
        n       Show network interfaces (and more if space allows)
        p       Show processes (and more if space allows)
        q       Quit the program
-i Sets the monitoring interval in seconds. The default is 2 seconds.
-n Specifies the maximum number of network interfaces shown. If this number exceed the number of network interfaces installed, the latter is used. If this argument is omitted a default of 2 (two) is assumed. If a value of zero is specified, no network information will be displayed.
-p Specifies the maximum number of processes shown. If this argument is omitted a default of 16 (sixteen) is assumed. If a value of zero is specified, no process information will be displayed. Retrieval of process information constitutes the majority of the topas overhead. If process information is not required, you should always use this option to specify that you don't want process information.

Subcommands

While topas is running, it accepts one-character subcommands. Each time the monitoring interval elapses, the program checks for one of the following subcommands and responds to the action requested.
a Show all of the variable sections (network, disk, and process) if space allows.
d Show disk information. If the requested number of disks and the requested number of network interfaces will fit on a 25-line display, both are shown. If there is space left on a 25-line display to list at least three processes, as many processes as will fit are also displayed.
h Show the same help screen as displayed by the -h command line argument.
n Show network interface information. If the requested number of disks and the requested number of network interfaces will fit on a 25-line display, both are shown. If there is space left on a 25-line display to list at least three processes, as many processes as will fit are also displayed.
p Show process information. If the requested number of processes leaves enough space on a 25-line display to also display the requested number of network interfaces, those are shown. If there is also space to show the requested number of disks, those are shown as well.
q Quit the program.

Examples

  1. To display four "hot" disks every 5 seconds and omit network interface and process information, enter:
    topas -i5 -n0 -p0
  2. To display the five most active processes and neither network nor disk information, enter:
    topas -p5 -n0 -d0
  3. To run the program with default options, enter:
    topas

Files

/usr/bin/topas Contains the topas command.

Related Information

The iostat command, and vmstat command.

System Performance Measurement Interface in the Performance Toolbox Version 1.2 and 2 for AIX: Guide and Reference.

The lchmon sample program that ships with perfagent.server.
[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]