SYSTAT(1) BSD Reference Manual SYSTAT(1)NAME
systat - display system statistics on a crt
SYNOPSIS
systat [-display] [refresh-interval]
DESCRIPTION
Systat displays various system statistics in a screen oriented fashion
using the curses screen display library, curses(3).
While systat is running the screen is usually divided into two windows
(an exception is the vmstat display which uses the entire screen). The
upper window depicts the current system load average. The information
displayed in the lower window may vary, depending on user commands. The
last line on the screen is reserved for user input and error messages.
By default systat displays the processes getting the largest percentage
of the processor in the lower window. Other displays show swap space us-
age, disk I/O statistics (a la iostat(8)), virtual memory statistics (a
la vmstat(8)), network ``mbuf'' utilization, and network connections (a
la netstat(1)).
Input is interpreted at two different levels. A ``global'' command in-
terpreter processes all keyboard input. If this command interpreter
fails to recognize a command, the input line is passed to a per-display
command interpreter. This allows each display to have certain display-
specific commands.
Command line options:
-display The - flag expects display to be one of: pigs, iostat,
swap, mbufs, vmstat or netstat. These displays can also
be requested interactively (without the ``-'') and are
described in full detail below.
refresh-interval The refresh-value specifies the screen refresh time in-
terval in seconds.
Certain characters cause immediate action by systat. These are
^L Refresh the screen.
^G Print the name of the current ``display'' being shown in the
lower window and the refresh interval.
^Z Stop systat.
: Move the cursor to the command line and interpret the input
line typed as a command. While entering a command the cur-
rent character erase, word erase, and line kill characters
may be used.
The following commands are interpreted by the ``global'' command inter-
preter.
help Print the names of the available displays on the command
line.
load Print the load average over the past 1, 5, and 15 minutes on
the command line.
stop Stop refreshing the screen.
[start] [number]
Start (continue) refreshing the screen. If a second, numer-
ic, argument is provided it is interpreted as a refresh in-
terval (in seconds). Supplying only a number will set the
refresh interval to this value.
quit Exit systat. (This may be abbreviated to q.)
The available displays are:
pigs Display, in the lower window, those processes resident in
main memory and getting the largest portion of the processor
(the default display). When less than 100% of the processor
is scheduled to user processes, the remaining time is ac-
counted to the ``idle'' process.
iostat Display, in the lower window, statistics about processor use
and disk throughput. Statistics on processor use appear as
bar graphs of the amount of time executing in user mode
(``user''), in user mode running low priority processes
(``nice''), in system mode (``system''), and idle (``idle'').
Statistics on disk throughput show, for each drive, kilobytes
of data transferred, number of disk transactions performed,
and average seek time (in milliseconds). This information
may be displayed as bar graphs or as rows of numbers which
scroll downward. Bar graphs are shown by default;
The following commands are specific to the iostat display;
the minimum unambiguous prefix may be supplied.
numbers Show the disk I/O statistics in numeric form.
Values are displayed in numeric columns which
scroll downward.
bars Show the disk I/O statistics in bar graph form
(default).
msps Toggle the display of average seek time (the de-
fault is to not display seek times).
swap Show information about swap space usage on all the swap areas
compiled into the kernel. The first column is the device
name of the partition. The next column is the total space
available in the partition. The Used column indicates the
total blocks used so far; the graph shows the percentage of
space in use on each partition. If there are more than one
swap partition in use, a total line is also shown. Areas
known to the kernel, but not in use are shown as not avail-
able.
mbufs Display, in the lower window, the number of mbufs allocated
for particular uses, i.e. data, socket structures, etc.
vmstat Take over the entire display and show a (rather crowded) com-
pendium of statistics related to virtual memory usage, pro-
cess scheduling, device interrupts, system name translation
cacheing, disk I/O etc.
The upper left quadrant of the screen shows the number of
users logged in and the load average over the last one, five,
and fifteen minute intervals. Below this line are statistics
on memory utilization. The first row of the table reports
memory usage only among active processes, that is processes
that have run in the previous twenty seconds. The second row
reports on memory usage of all processes. The first column
reports on the number of physical pages claimed by processes.
The second column reports the number of physical pages that
are devoted to read only text pages. The third and fourth
columns report the same two figures for virtual pages, i.e.,
the number of pages that would be needed if all processes had
all of their pages. Finally the last column shows the number
of physical pages on the free list.
Below the memory display is a list of the average number of
processes (over the last refresh interval) that are runnable
(`r'), in page wait (`p'), in disk wait other than paging
(`d'), sleeping (`s'), and swapped out but desiring to run
(`w'). To the right of this list is a row that lists the av-
erage number of context switches (`Csw'), traps (`Trp'; in-
cludes page faults), system calls (`Sys'), interrupts
(`Int'), network software interrupts (`Sof'), and page faults
(`Flt').
Below the queue length listing is a numerical listing and a
bar graph showing the amount of system (shown as `='), inter-
rupt (shown as `+'), user (shown as `>'), nice (shown as
`-'), and idle time (shown as ` ').
Below the CPU usage graph are statistics on name transla-
tions. This lists the number of names translated in the pre-
vious interval, the number and percentage of the translations
that were handled by the system wide name translation cache,
and the number and percentage of the translations that were
handled by the per process name translation cache.
At the bottom left is the disk usage display. It reports the
number of seeks, transfers, and number of kilobyte blocks
transferred per second averaged over the refresh period of
the display (by default, five seconds). It also reports the
average milliseconds per seek; however, if the hardware does
not use separate disk-seek operations, this value is calcu-
lated by assuming one seek per transfer, which may often be
inaccurate.
Under the date in the upper right hand quadrant are statis-
tics on paging and swapping activity. The first two columns
report the average number of pages brought in and out per
second over the last refresh interval due to page faults and
the paging daemon. The third and fourth columns report the
average number of pages brought in and out per second over
the last refresh interval due to swap requests initiated by
the scheduler. The first row of the display shows the aver-
age number of disk transfers per second over the last refresh
interval; the second row of the display shows the average
number of pages transferred per second over the last refresh
interval.
Below the paging statistics is a column giving a detailed
breakdown of virtual memory activity averaged over the re-
fresh period: the number of copy-on-write faults (`cow'), ob-
ject cache lookups (`objlk'), object cache hits (`objht'),
zero- and demand-filled pages (`zfod' and `nzfod'), percent-
age of page fills that were zero-fills (`%zfod'), paging ac-
tivity for the kernel (`kern'), non-pageable pages (`wire'),
active pages (`act'), inactive pages (`inact'), free pages
(`free'), pages freed by the page daemon (`daefr'), pages
freed by voluntarily by processes (`prcfr'), reactivations
(`react'), scans by the pagedaemon (`scan'), revolutions of
the clock hand (`hdrev'), and in transit blocking page faults
(`intrn').
Running down the right hand side of the display is a break-
down of the interrupts being handled by the system. At the
top of the list is the total interrupts per second over the
time interval. The rest of the column breaks down the total
on a device by device basis. Only devices that have inter-
rupted at least once since boot time are shown. (This is
currently unimplemented on i386 systems.)
The following commands are specific to the vmstat display;
the minimum unambiguous prefix may be supplied.
boot Display cumulative statistics since the system
was booted.
run Display statistics as a running total from the
point this command is given.
time Display statistics averaged over the refresh
interval (the default).
zero Reset running statistics to zero.
netstat Display, in the upper portion of the window the most active
interfaces along with the number of bytes, packets and errors
both sent and received. For interfaces that have a link
speed configured, the utilization of the interface is calcu-
lated as a percentage. The interfaces listed are ordered by
activity measured by summing the number of bytes sent and re-
ceived.
Also in the upper portion of the window are the most active
interface addresses along with the number of bytes and pack-
ets both sent and received. The interface addresses are or-
dered by activity measured by summing the number of bytes
sent and received.
In the lower portion of the window protocol statistics are
displayed (similar to the output generated by the -s flag to
netstat(1)). By default only statistics that are non-zero (or
have recently been non-zero) are printed.
The display parameters can be configured with the following
commands:
allifs Toggle the inclusion of interfaces marked down
in the interface display. These display is
still limited to a portion of the total screen
size even if interfaces marked down are includ-
ed in the display.
allstats Toggle the displaying of all statistics, not
just the non-zero ones. This is equivalent to
the specifying both the -v and -s flags to
netstat(1).
boot Display cumulative statistics since the system
was booted.
numbers Display interface addresses numerically.
names Display interface addresses symbolically.
run Display statistics as a running total from the
point this command is given.
display [protocol ...]
Control the displaying of statistics for vari-
ous protocols. The selection consists of a
space separated list of the following keywords:
all, icmp, !icmp, igmp, !igmp, ip, !ip, none,
tcp, !tcp, udp and !udp. The arguments with a
leading ``!'' indicate that the specified pro-
tocol should be excluded from the list. When
no arguments are specified, the protocols cur-
rently selected for display are shown.
time Display statistics averaged over the refresh
interval (the default).
zero Reset running statistics to zero.
reset Reset the display to the default.
Commands to switch between displays may be abbreviated to the minimum un-
ambiguous prefix; for example, ``io'' for ``iostat''. Certain informa-
tion may be discarded when the screen size is insufficient for display.
For example, on a machine with 10 drives the iostat bar graph displays
only 3 drives on a 24 line terminal. When a bar graph would overflow the
allotted screen space it is truncated and the actual value is printed
``over top'' of the bar.
The following commands are common to each display which shows information
about disk drives. These commands are used to select a set of drives to
report on, should your system have more drives configured than can nor-
mally be displayed on the screen.
ignore [drives] Do not display information about the drives indi-
cated. Multiple drives may be specified, sepa-
rated by spaces.
display [drives] Display information about the drives indicated.
Multiple drives may be specified, separated by
spaces.
FILES
/bsd For the namelist.
/dev/kmem For information in main memory.
/dev/drum For information about swapped out processes.
/etc/hosts For host names.
/etc/networks For network names.
/etc/services For port names.
HISTORY
The systat program appeared in 4.3BSD.
BUGS
Takes 2-10 percent of the cpu. Certain displays presume a minimum of 80
characters per line. The vmstat display looks out of place because it is
(it was added in as a separate display rather than created as a new pro-
gram).
4.3 Berkeley Distribution December 30, 1993 5