SYSTAT(1) NetBSD General Commands Manual SYSTAT(1)
NAME
systat -- display system statistics in a full-screen view
SYNOPSIS
systat [-bn] [-M core] [-N system] [-t turns] [-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 show more detailed process information, swap space usage, disk usage statistics (a la df(1)), disk I/O statistics (a la iostat(8)), virtual memory statistics (a la vmstat(1)), network ``mbuf'' utilization, network 'ifstat' traffic, 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. Command line options: -M core Extract values associated with the name list from core instead of the default /dev/mem. -N system Extract the name list from system instead of the default /netbsd. -b Show the chosen display once and exit. -n Do not resolve IP addresses into string hostnames (FQDNs) on netstat. It has the same effect as numbers subcommand in netstat. -w wait See refresh-interval. -t turns How many refreshes to show each screen in 'all' display mode. display The display argument expects to be one of: all, bufcache, df, ifstat, inet.icmp, inet.ip, inet.tcp, inet.tcpsyn, inet6.ip6, iostat, mbufs, netstat, pigs, ps, swap, syscall or vmstat. These displays can also be requested interactively and are described in full detail below. refresh-interval The refresh-interval specifies the screen refresh time interval in seconds. This is provided for backwards compatibility, and overrides the refresh-interval spec- ified with the -w flag. 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. ?, h Print the names of the available displays on the command line. : 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 key Print the names of the available displays on the command line. It will print long names as ``inet.*''. To print items under ``inet'', give inet as key. 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, 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. quit Exit systat. (This may be abbreviated to q.) The available displays are: all Cycle through all displays automatically. At each display, wait some refresh-turns, then switch to the next display. Duration of one refresh-turn is adjustable with the -w option, number of refresh-turns can be changed with the -t option. bufcache Display, in the lower window, statistics about the file sys- tem buffers. Statistics for each file system that has active buffers include the number of buffers for that file system, the number of active kilobytes in those buffers and the total size of the buffers for that file system. df Lists disk usage statistics for all filesystems, including the available free space as well as a bar graph indicating the used capacity. The following commands are specific to the df display: all Displays information for all filesystems, includ- ing kernfs, procfs and null-mounts. some Suppress information about procfs, kernfs and null-mounts (default). ifstat Display the network traffic going through active interfaces on the system. Idle interfaces will not be displayed until they receive some traffic. For each interface being displayed, the current, peak and total statistics are displayed for incoming and outgoing traffic. By default, the ifstat display will automatically scale the units being used so that they are in a human-read- able format. The scaling units used for the current and peak traffic columns can be altered by the scale command. scale [units] Modify the scale used to display the current and peak traffic over all interfaces. The following units are recognised: kbit, kbyte, mbit, mbyte, gbit, gbyte and auto. pps Show statistics in packets per second instead of bytes/bits per second. A subsequent call of pps switches this mode off. match [patterns] Display only interfaces that match pattern provided as an argument. Patterns should be in shell syntax separated by whitespaces or commas. If this command is called without arguments then all interfaces are displayed. For example: match re0, bge1 This will display re0 and bge1 interfaces. match re*, bge*, lo0 This will display all re interfaces, all bge interfaces and the loopback interface. inet.icmp Display ICMP statistics. inet.ip Display IPv4 and UDP statistics. inet.tcp Display TCP statistics. inet.tcpsyn Display statistics about the TCP ``syncache''. inet6.ip6 Display IPv6 statistics. 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 time spent in disk accesses in milliseconds. This infor- mation 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). secs Toggle the display of time in disk activity (the default is to not display time). all Show the read and write statistics combined (default). rw Show the read and write statistics separately. 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 unambigu- ous prefix may be supplied): all Toggle the displaying of server processes awaiting requests (this is the equivalent of the -a flag to netstat 1). numbers Display network addresses numerically. names Display network addresses symbolically. protocol Display only network connections using the indicated protocol (currently either ``tcp'' or ``udp''). ignore [items] Do not display information about connections associated with the specified hosts or ports. Hosts and ports may be specified by name (``vangogh'', ``ftp''), or numerically. Host addresses use the Internet dot notation (``128.32.0.9''). Multiple items may be speci- fied with a single command by separating them with spaces. display [items] Display information about the connections asso- ciated with the specified hosts or ports. As for ignore, [items] may be names or numbers. show [ports|hosts] Show, on the command line, the currently selected protocols, hosts, and ports. Hosts and ports which are being ignored are prefixed with a `!'. If ports or hosts is supplied as an argument to show, then only the requested information will be displayed. reset Reset the port, host, and protocol matching mechanisms to the default (any protocol, port, or host). pigs Display, in the lower window, those processes which are get- ting the largest portion of the processor (the default dis- play). When less than 100% of the processor is scheduled to user processes, the remaining time is accounted to the ``idle'' process. ps Display, in the lower window, the same information provided by the command ps(1) with the flags -aux. The following command is specific to the ps display; the min- imum unambiguous prefix may be supplied. user name Limit the list of processes displayed to those owned by user name. If name is specified as `+', processes owned by any user are displayed (default). swap Show information about swap space usage on all the swap areas configured with swapctl(8). 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. syscall Show per system call statistics. The display consists of several columns of system call name and counts. In order to stop entries moving around the screen too much, an infinite response filter is applied to the values before they are sorted. The following commands are specific to the syscall display: sort name Sort display by the syscall name (default). sort count Sort display by the count of calls or time spent in the calls. sort syscall Sort display be syscall number. show count Show the number of times the system call has be called (default). show time Show the average amount of time (in arbitrary units) spent in a call of the syscall. vmstat Take over the entire display and show a (rather crowded) com- pendium of statistics related to virtual memory usage, process scheduling, device interrupts, system name transla- tion 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 one, five, and fifteen minute intervals. Below this are statistics on memory utilization. The first row of the table reports mem- ory 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, that is 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'). Below the queue length listing is a numerical listing and a bar graph showing the amount of sys- tem (shown as `='), user (shown as `>'), nice (shown as `-'), and idle time (shown as ` '). To the right of the process statistics is a column that lists the average number of context switches (`Csw'), traps (`Traps'; includes page faults), system calls (`SysCa'), interrupts (`Intr'), network software interrupts (`Soft'), page faults (`Fault'). Below this are statistics on memory utilization. The first row of the table reports memory usage only among active pro- cesses, 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 pages of memory and swap. The third column gives the number of pages of free memory and swap. Below the memory display 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 han- dled 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 trans- ferred per second averaged over the refresh period of the display (by default, five seconds), and the time spent in disk accesses. If there are more than five disks, and the terminal window has more than 24 lines, the disks display will be flipped so that more of the disk statistics are visi- ble. 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 another columns of paging data. From top to bottom, these represent: `forks' number of fork() calls `fkppw' number of fork() calls where parent waits `fksvm' number of fork() calls where vmspace is shared `pwait' number of times fault had to wait on a page `relck' number of times uvmfault_relock() is called `rlkok' number of times uvmfault_relock() is a success `noram' number of times fault was out of RAM `ndcpy' number of times fault clears ``needs copy'' `fltcp' number of times fault promotes with copy (2b) `zfod' number of times fault promotes with zerofill (2b) `cow' number of times faulted for anonymous for Copy- On-Write (case 1b) `fmin' min number of free pages `ftarg' target number of free pages `itarg' target number of inactive pages `flnan' number of times fault was out of anonymous pages `pdfre' number of pages daemon freed since boot `pdscn' number of pages daemon scanned since boot Note that the `%zfod' percentage is usually less than 100%, however it may exceed 100% if a large number of requests are actually used long after they were set up during a period when no new pages are being set up. Thus this figure is most interesting when observed over a long time period, such as from boot time (see below on getting such a display). To the left of the column of paging statistics 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. Commands to switch between displays may be abbreviated to the minimum unambiguous 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. Drives may be specified as drive names or as patterns specified in the notation described by fnmatch(3). 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. drives [drives] With no arguments, display a list of available drives. With arguments, replace the list of currently displayed drives with the ones specified. The following commands are specific to the inet.*, inet6.*, syscall and vmstat 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.
FILES
/netbsd For the namelist. /dev/kmem For information in main memory. /etc/hosts For host names. /etc/networks For network names. /etc/services For port names.
NOTES
Much of the information that systat vmstat uses is obtained from struct vmmeter cnt.
SEE ALSO
df(1), netstat(1), ps(1), top(1), vmstat(1), iostat(8), pstat(8)
HISTORY
The systat program appeared in 4.3BSD.
BUGS
Consumes CPU resources and thus may skew statistics. 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 from what used to be a different program). The -b option requires a real terminal and could be converted to simply output to standard output. NetBSD 9.3 December 26, 2018 NetBSD 9.3
Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.