LinuxCommandLibrary

topas

Reports selected local system statistics

Purpose

Reports selected local system statistics.

Syntax

topas [ -d number_of_monitored_hot_disks ] [ -h ] [ -i monitoring_interval_in_seconds ] [ -n number_of_monitored_hot_network_interfaces ] [ -p number_of_monitored_hot_processes ] [ -w number_of_monitored_hot_WLM classes ] [ -c number_of_monitored_hot_CPUs ] [ -P | -W ]

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 following command line:

topas -d2 -i2 -n2 -p20 -w2 -c2 

The program extracts statistics from the system with an interval specified by the monitoring_interval_in_seconds argument. The default output, as shown below, consists of two fixed parts and a variable section. The top two lines at the left of the display show the name of the system the topas command runs on, the date and time of the last observation, and the monitoring interval.

The second fixed part fills the rightmost 25 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. Subtract PgspIn from this value to 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. Subtract PgspOut from this value to 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.
NFS Display NFS stats in calls per second
  • Server V2 calls/sec
  • Client V2 calls/sec
  • Server V3 calls/sec
  • Client V3 calls/sec

The variable part of the topas display can have one, two, three, four, or five subsections. If more than one subsection displays, they are always shown in the following order:

When the topas command is started, it displays all subsections for which hot entities are monitored. The exception to this is the WorkLoad Management (WLM) Classes subsection, which is displayed only when WLM is active.

CPU Utilization

This subsection displays a bar chart showing cumulative CPU usage. If more than one CPU exists, a list of CPUs can be displayed by pressing the c key twice. Pressing the c key only once will turn this subsection off. The following fields are displayed by both formats:

User%
This shows the percent of CPU used by programs executing in user mode. (Default sorted by User%)
Kern%
This shows the percent of CPU used by programs executing in kernel mode.
Wait%
This shows the percent of time spent waiting for IO.
Idle%
This shows the percent of time the CPU(s) is idle.

When this subsection first displays the list of hot CPUs, the list is sorted by the User% field. However, the list can be sorted by the other fields by moving the cursor to the top of the desired column.

Network Interfaces

This subsection displays a list of hot network interfaces. The maximum number of interfaces displayed is the number of hot interfaces being monitored, as specified with the -n flag. A smaller number of interfaces will be displayed if other subsections are also being displayed. Pressing the n key turns off this subsection. Pressing the n key again shows a one-line report summary of the activity for all network interfaces. Both reports display the following fields:

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.

When this subsection first displays the list of hot network interfaces, the list is sorted by the KBPS field. However, the list can be sorted by the other fields by moving the cursor to the top of the desired column. Sorting is only valid for up to 16 network adapters.

Physical Disks This subsection displays a list of hot physical disks. The maximum number of physical disks displayed is the number of hot physical disks being monitored as specified with the -d flag. A smaller number of physical disks will be displayed if other subsections are also being displayed. Pressing the d key turns off this subsection. Pressing the d key again shows a one-line report summary of the activity for all physical disks. Both reports display the following fields:
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.

When this subsection first displays the list of hot physical disks, the list is sorted by the KBPS field. However, the list can be sorted by the other fields by moving the cursor to the top of the desired column. Sorting is only valid for up to 128 physical disks.

WLM Classes

This subsection displays a list of hot WorkLoad Management (WLM) Classes. The maximum number of WLM classes displayed is the number of hot WLM classes being monitored as specified with the -w flag. A smaller number of classes will be displayed if other subsections are also being displayed. Pressing the w key turns off this subsection. The following fields are displayed for each class:

% CPU Utilization
The average CPU utilization of the WLM class over the monitoring interval.
% Mem Utilization
The average memory utilization of the WLM class over the monitoring interval.
% Blk I/O
The average percent of Block I/O of the WLM class over the monitoring interval.

When this subsection first displays the list of hot WLM classes, the list will be sorted by the CPU% field. However, the list can be sorted by the other fields by moving the cursor to the top of the desired column.

Processes This subsection displays a list of hot processes. The maximum number of processes displayed is the number of hot processes being monitored as specified with the -p flag. A smaller number of processes will be displayed if other subsections are also being displayed. Pressing the p key turns off this subsection. The process are sorted by their CPU usage over the monitoring interval. The following fields are displayed for each process:
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 is 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 (if the WLM section is off)
The user name of the user who owns the process.
WorkLoad Management (WLM) Class (if the WLM section is on)
The WLM class to which the process belongs.

Implementation Specifics

The topas command is valid only on the POWER-based platform.

Sample Default 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 13 15:56:32 2000 Interval: 2 Cswitch 113 Readch 1853576 Syscall 2510 Writech 49883 CPU User% Kern% Wait% Idle% Reads 466 Rawin 0 cpu0 7.0 4.0 0.0 89.0 Writes 12 Ttyout 706 cpu1 1.0 8.0 0.0 91.0 Forks 0 Igets 0 cpu2 0.0 0.0 0.0 100.0 Execs 0 Namei 0 Runqueue 0.0 Dirblk 0 Waitqueue 0.0 Interf KBPS I-Pack O-Pack KB-In KB-Out lo0 100.4 45.7 45.7 50.2 50.2 PAGING MEMORY tr0 2.0 4.4 3.4 1.4 0.6 Faults 1 Real,MB 255 Steals 0 % Comp 81.0 Disk Busy% KBPS TPS KB-Read KB-Writ PgspIn 0 % Noncomp 19.0 hdisk0 0.0 0.0 0.0 0.0 0.0 PgspOut 0 % Client 3.0 hdisk1 0.0 0.0 0.0 0.0 0.0 PageIn 0 PageOut 0 PAGING SPACE WLM-Class (Active) CPU% Mem% Disk% Sios 0 Size,MB 0 System 8 41 12 % Used Shared 1 24 9 % Free NFS calls/sec Name PID CPU% PgSP Class ServerV2 0 Press: topas (35242) 3.0 0.3 System ClientV2 0 "h" for help. X (3622) 1.4 44.4 System ServerV3 0 "q" to quit. notes (25306) 1.3 123.3 System ClientV3 0 

Sample Full Screen Process Output

Topas Monitor for host: mothra Interval: 2 Wed Nov 8 12:27:34 2000 DATA TEXT PAGE PGFAULTS USER PID PPID PRI NI RES RES SPACE TIME CPU% I/O OTH COMMAND root 1806 0 37 41 16 3374 16 13:25 1.0 0 0 gil root 1032 0 16 41 3 3374 3 0:00 0.0 0 0 lrud root 1290 0 60 41 4 3374 4 0:02 0.0 0 0 xmgc root 1548 0 36 41 4 3374 4 0:26 0.0 0 0 netm root 1 0 60 20 197 9 180 0:24 0.0 0 0 init root 2064 0 16 41 4 3374 4 0:04 0.0 0 0 wlmsched root 2698 1 60 20 14 2 14 0:00 0.0 0 0 shlap root 3144 1 60 20 40 1 36 5:19 0.0 0 0 syncd root 3362 0 60 20 4 3374 4 0:00 0.0 0 0 lvmbb root 3666 1 60 20 135 23 123 0:00 0.0 0 0 errdemon root 3982 0 60 20 4 3374 4 0:01 0.0 0 0 rtcmd root 4644 1 17 20 6 3374 6 0:00 0.0 0 0 dog root 4912 1 60 20 106 13 85 0:00 0.0 0 0 srcmstr root 5202 4912 60 20 94 8 84 0:01 0.0 0 0 syslogd root 5426 4912 60 20 195 76 181 0:12 0.0 0 0 sendmail root 5678 4912 60 20 161 11 147 0:01 0.0 0 0 portmap root 5934 4912 60 20 103 11 88 0:00 0.0 0 0 inetd root 6192 4912 60 20 217 61 188 0:21 0.0 0 0 snmpd root 6450 4912 60 20 137 10 116 0:00 0.0 0 0 dpid2 root 6708 4912 60 20 157 29 139 0:06 0.0 0 0 hostmibd root 0 0 16 41 3 3374 3 7:08 0.0 0 0 root 6990 1 60 20 106 10 86 0:06 0.0 0 0 cron 

Sample Full-Screen WorkLoad Management Classes Output

Topas Monitor for host: mothra Interval: 2 Wed Nov 8 12:30:54 2000 WLM-Class (Active) CPU% Mem% Disk-I/O% System 0 0 0 Shared 0 0 0 Default 0 0 0 Unmanaged 0 0 0 Unclassified 0 0 0 ============================================================================== DATA TEXT PAGE PGFAULTS USER PID PPID PRI NI RES RES SPACE TIME CPU% I/O OTH COMMAND root 1 0 108 20 197 9 180 0:24 0.0 0 0 init root 1032 0 16 41 3 3374 3 0:00 0.0 0 0 lrud root 1290 0 60 41 4 3374 4 0:02 0.0 0 0 xmgc root 1548 0 36 41 4 3374 4 0:26 0.0 0 0 netm root 1806 0 37 41 16 3374 16 13:25 0.0 0 0 gil root 2064 0 16 41 4 3374 4 0:04 0.0 0 0 wlmsched root 2698 1 108 20 14 2 14 0:00 0.0 0 0 shlap root 3144 1 108 20 40 1 36 5:19 0.0 0 0 syncd root 3362 0 108 20 4 3374 4 0:00 0.0 0 0 lvmbb root 3666 1 108 20 135 23 123 0:00 0.0 0 0 errdemon root 3982 0 108 20 4 3374 4 0:01 0.0 0 0 rtcmd 

Flags

-d Specifies the number of disks to be monitored. This is also the maximum number of disks displayed when enough room is available on the screen. When this number exceeds the number of disks installed, only the installed disks will be monitored and displayed. If this argument is omitted, a default of 2 is assumed. If a value of 0 (zero) is specified, no disk information is monitored.
-h Displays help information in the following format:
usage: topas [-d number-of-monitored-hot-disks] [-h] [-i monitoring-interval_in_seconds] [-n number-of-monitored-hot-network-interfaces] [-p number-of-monitored-hot-processes] [-w number-of-monitored-hot-WLM classes] [-c number-of-monitored-hot-CPUs] [-P|-W] 
-i Sets the monitoring interval in seconds. The default is 2 seconds.
-n Specifies the number of hot network interfaces to be monitored. This is also the maximum number of network interfaces displayed when enough room is available on the screen. When this number exceeds the number of network interfaces installed, only the installed network interfaces will be monitored and displayed. If this argument is omitted, a default of 2 is assumed. If a value of 0 (zero) is specified, no network information is monitored.
-p Specifies the number of hot processes to be monitored. This is also the maximum number of processes shown when enough room is available on the screen. If this argument is omitted, a default of 20 is assumed. If a value of 0 is specified, no process information will be monitored. Retrieval of process information constitutes the majority of the topas overhead. If process information is not required, always use this option to specify that you do not want process information.
-w Specifies the number of hot WorkLoad Management (WLM) classes to be monitored. This is also the maximum number of WLM classes displayed when enough room is available on the screen. If this number exceeds the number of WLM classes installed, only the installed WLM classes will be monitored and displayed. If this argument is omitted, a default of 2 is assumed. If a value of 0 (zero) is specified, no WLM class information is monitored.
-c Specifies the number of hot CPUs to be monitored. This is also the maximum number of CPUs displayed when enough room is available on the screen. If this number exceeds the number of CPUs available, only the installed CPUs will be monitored and displayed. If this argument is omitted, a default of 2 is assumed. If a value of 0 (zero) is specified, no CPU information is monitored.
-P Displays the full-screen process display. This display shows a list of the busiest processes, similar to the process subsection on the default display, only with more columns showing more metrics per process. This list can be sorted by any column.
-W

Displays the full-screen WLM class display, which is a split display. The top part of the display shows a list of hot WLM classes, similar to the WLM classes subsection on the default display, but with enough space available to display the full class names. This list can be sorted on any column.

The bottom part of the display shows a list of busiest processes, similar to the full screen process display, but only displays processes belonging to one WLM class (selected with the f key).

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 The a key shows all of the variable subsections being monitored (CPU, network, disk, WLM, and process). Pressing the a key always returns the topas command to the initial main display.
c The c key toggles the CPU subsection between the cumulative report, off, and a list of the busiest CPUs. The number of busiest CPUs displayed will depend upon the space available on the screen.
d The d key toggles the disk subsection between a list of busiest disks, off, and the report on the total disk activity of the system. The number of busiest disks displayed will depend upon the space available on the screen.
h Show the help screen.
n The n key toggles the network interfaces subsection between a list of busiest interfaces, off, and the report on the total network activity of the system. The number of busiest interfaces displayed will depend upon the space available on the screen.
w The w key toggles the WorkLoad Management (WLM) classes subsection on and off. The number of busiest WLM classes displayed will depend upon the space available on the screen.
p The p key toggles the hot processes subsection on and off. The number of busiest processes displayed will depend upon the space available on the screen.
P The uppercase P key replaces the default display with the full-screen process display. This display provides more detailed information about processes running on the system than the process section of the main display. When the P key is pressed again, it toggles back to the default main display.
W The uppercase W key replaces the default display with the full-screen WLM class display. This display provides more detailed information about WLM classes and processes assigned to classes. When the W key is pressed again, it toggles back to the default main display.
f Moving the cursor over a WLM class and pressing the f key displays the list of top processes in the class at the bottom of the WLM screen. This key is valid only when topas is in the full-screen WLM display (by using the W key or the -W flag).
q Quit the program.
r Refresh the display.
Arrow and Tab keys Subsections from the main display such as the CPU, Network, Disk, WLM Classes, and the full-screen WLM and Process displays can be sorted by different criteria. Positioning the cursor over a column activates sorting on that column. The entries are always sorted from highest to lowest value. The cursor can be moved by using the Tab key or the arrow keys. Sorting is only valid for 128 disks and 16 network adapters.

Examples

  1. To display two "hot" disks every five seconds and omit network interface, WLM classes, and process information, type:
    topas -i5 -n0 -p0 -w0 
  2. To display the five most active processes and the two most active WLM classes (which is the default when omitting the -w flag) but no network or disk information, type:
    topas -p5 -n0 -d0 
  3. To run the program with default options, type:
    topas 
  4. To go directly to the process display, type:
    topas -P 
  5. To go directly to the WLM classes display, type:
    topas -W 

Files

/usr/bin/topas Contains the topas command.

Related Information

The iostat command, vmstat command, wlmstat command, sar command, ps command.

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

The lchmon sample program that ships with perfagent.server.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Copied to clipboard