SYSTAT(1) AerieBSD 1.0 Refernce Manual SYSTAT(1)

NAME

systat — display system statistics

SYNOPSIS

systat [-n] [-w wait] [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 include swap space usage, 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 interpreter 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.

The options are as follows:
-n
Do not try to reverse-map IP address.
-w wait
Specifies the screen refresh time interval in seconds. This option is overridden by refresh-interval, if given. The default interval is 5 seconds.
display
The display argument expects to be one of: pigs, iostat, swap, sensors, mbufs, vmstat, ifstat or netstat. These displays can also be requested interactively and are described in full detail below. display may be abbreviated to the minimum unambiguous prefix; for example, “io” for “iostat”.
refresh-interval
The refresh-interval specifies the screen refresh time interval in seconds. This is provided for backwards compatibility, and overrides the wait interval specified with the -w flag. The default interval is 5 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
Suspend systat.
\&:
Move the cursor to the command line and interpret the input line typed as a command. While entering a command the current character erase, word erase, and line kill characters may be used.
q
Exit systat.

The following commands are interpreted by the “global” command interpreter.
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.
quit
Exit systat. (This may be abbreviated to q..)
stop
Stop refreshing the screen.
[start] [number] Start (continue) refreshing the screen. If a second, numeric, argument is provided it is interpreted as a refresh interval (in seconds). Supplying only a number will set the refresh interval to this value.

Again, display may be abbreviated to the minimum unambiguous prefix. The available displays are:
ifstat
Display, in the lower window, interface statistics. The “State” column has the format .Sm off -up\*(Ba dn [: -U\*(Ba D]. .Sm on ‘up’ and ‘dn’ represent whether the interface is up or down. ‘U’ and ‘D’ represent whether the interface is connected or not; in the case of carp(4) interfaces, whether the interface is in master or backup state, respectively. See below for more options.
iostat
Display, in the lower window, statistics about disk throughput. Statistics on disk throughput show, for each drive, data transferred in kilobytes, number of disk transactions performed, and time spent in disk accesses (in fractions of a second).
mbufs
Display, in the lower window, the number of mbufs allocated for particular uses, i.e., data, socket structures, etc.
netstat
Display, in the lower window, network connections. By default, network servers awaiting requests are not displayed. Each address is displayed in the format “host.port”, with each shown symbolically, when possible. It is possible to have addresses displayed numerically, limit the display to a set of ports, hosts, and/or protocols (the minimum unambiguous prefix may be supplied):
-all
Toggle the displaying of server processes awaiting requests (this is the equivalent of the -a flag to netstat(1/)).
-display[items]
Display information about the connections associated with the specified hosts or ports. As for ignore, items may be names or numbers.
-ignore[items]
Do not display information about connections associated with the specified hosts or ports. Hosts and ports may be specified by name .Pf ( Dq vangogh , “ftp)”, or numerically. Host addresses use the Internet dot notation (“128.32.0.9”). Multiple items may be specified with a single command by separating them with spaces.
-names
Display network addresses symbolically.
-numbers
Display network addresses numerically.
-reset
Reset the port, host, and protocol matching mechanisms to the default (any protocol, port, or host).
-show[protos\&|ports\&|hosts]
Show, on the command line, the currently selected protocols, hosts, and ports. Protocols, hosts and ports which are being ignored are prefixed with a "\&!". If an argument is supplied to -show, then only the requested information will be displayed.
-tcp\*(Ba udp \*(Ba all
Display only network connections using the indicated protocol.
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 accounted to the “idle” process.
sensors
Display, in the lower window, the current values of available hardware sensors, in a format similar to that of sysctl(8).
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 is 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 available.
vmstat
Take over the entire display and show a (rather crowded) compendium of statistics related to virtual memory usage, process scheduling, device interrupts, system name translation caching, 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 1, 5, and 15 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 amount of physical memory claimed by processes. The second column reports the same figure for virtual memory, that is, the amount of memory that would be needed if all processes were resident at the same time. Finally, the last column shows the amount of physical memory 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 disk wait other than paging (‘d’), sleeping (‘s’), and swapped out but desiring to run (‘w’). Below the queue length listing is a numerical listing and a bar graph showing the amount of interrupt (shown as "|")), system (shown as "=")), user (shown as "\*(Gt")), nice (shown as "-")), and idle time (shown as "\"\&).

To the right of the Proc display are statistics about Context switches (“Csw”), Traps (“Trp”), Syscalls (“Sys”), Interrupts (“Int”), Soft interrupts (“Sof”), and Faults (“Flt”) which have occurred during the last refresh interval.

Below the CPU Usage graph are statistics on name translations. It lists the number of names translated in the previous 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, number of kilobyte blocks transferred per second averaged over the refresh period of the display (by default, five seconds), and the time spent in disk accesses.

Under the date in the upper right hand quadrant are statistics 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 average 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.

Running down the right hand side of the display is a breakdown 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 interrupted at least once since boot time are shown.

Below the SWAPPING display and slightly to the left of the Interrupts display is a list of virtual memory statistics. The abbreviations are:

forks
process forks
fkppw
forks where parent waits
fksvm
forks where vmspace is shared
pwait
fault had to wait on a page
relck
fault relock called
rlkok
fault relock is successful
noram
faults out of ram
ndcpy
number of times fault clears "need copy"
fltcp
number of times fault promotes with copy
zfod
fault promotes with zerofill
cow
number of times fault anon cow
fmin
min number of free pages
ftarg
target number of free pages
itarg
target number of inactive pages
wired
wired pages
pdfre
pages daemon freed since boot
pdscn
pages daemon scanned since boot
pzidle
number of zeroed pages
kmapent
number of kernel map entries

The "%zfod" value is more interesting when observed over a long period, such as from boot time (see the -boot option below).

The following commands are specific to the vmstat and ifstat displays; 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.

Certain information 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 normally be displayed on the screen.

-display[drives]
Display information about the drives indicated. Multiple drives may be specified, separated by spaces.
-ignore[drives]
Do not display information about the drives indicated. Multiple drives may be specified, separated by spaces.

FILES

/etc/hosts
host names
/etc/networks
network names
/etc/services
port names

SEE ALSO

.Xt fstat 1 , kill(1), netstat(1), ps(1), top(1), iostat(8), pstat(8), renice(8), sysctl(8), vmstat(8)

HISTORY

The systat program appeared in 4.3BSD.

BUGS

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 program).


AerieBSD 1.0 Reference Manual August 26 2008 SYSTAT(1)