[BACK]Return to systat.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / systat

Annotation of src/usr.bin/systat/systat.1, Revision 1.31

1.31    ! jmc         1: .\"    $OpenBSD: systat.1,v 1.30 2003/09/02 18:50:06 jmc Exp $
1.2       deraadt     2: .\"    $NetBSD: systat.1,v 1.6 1996/05/10 23:16:39 thorpej Exp $
1.1       deraadt     3: .\"
                      4: .\" Copyright (c) 1985, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.28      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"    @(#)systat.1    8.2 (Berkeley) 12/30/93
                     32: .\"
                     33: .Dd December 30, 1993
                     34: .Dt SYSTAT 1
1.12      aaron      35: .Os
1.1       deraadt    36: .Sh NAME
                     37: .Nm systat
                     38: .Nd display system statistics on a crt
                     39: .Sh SYNOPSIS
                     40: .Nm systat
1.2       deraadt    41: .Op Fl w Ar wait
                     42: .Op Ar display
1.1       deraadt    43: .Op Ar refresh-interval
                     44: .Sh DESCRIPTION
1.13      aaron      45: .Nm
1.1       deraadt    46: displays various system statistics in a screen oriented fashion
                     47: using the curses screen display library,
                     48: .Xr curses 3 .
                     49: .Pp
                     50: While
1.13      aaron      51: .Nm
1.1       deraadt    52: is running the screen is usually divided into two windows (an exception
1.16      aaron      53: is the vmstat display which uses the entire screen).
                     54: The upper window depicts the current system load average.
                     55: The information displayed in the lower window may vary, depending on
                     56: user commands.
                     57: The last line on the screen is reserved for user
1.1       deraadt    58: input and error messages.
                     59: .Pp
                     60: By default
1.13      aaron      61: .Nm
1.1       deraadt    62: displays the processes getting the largest percentage of the processor
1.16      aaron      63: in the lower window.
                     64: Other displays show swap space usage, disk
1.1       deraadt    65: .Tn I/O
                     66: statistics (a la
1.13      aaron      67: .Xr iostat 8 ) ,
1.1       deraadt    68: virtual memory statistics (a la
1.13      aaron      69: .Xr vmstat 8 ) ,
                     70: network
                     71: .Dq mbuf
                     72: utilization, and network connections (a la
                     73: .Xr netstat 1 ) .
1.1       deraadt    74: .Pp
                     75: Input is interpreted at two different levels.
1.13      aaron      76: A
                     77: .Dq global
                     78: command interpreter processes all keyboard input.
1.1       deraadt    79: If this command interpreter fails to recognize a command, the
1.16      aaron      80: input line is passed to a per-display command interpreter.
                     81: This allows each display to have certain display-specific commands.
1.1       deraadt    82: .Pp
1.16      aaron      83: The options are as follows:
1.31    ! jmc        84: .Bl -tag -width "refresh-interval"
        !            85: .It Fl w Ar wait
        !            86: Specifies the screen refresh time interval in seconds.
        !            87: This option is overridden by
        !            88: .Ar refresh-interval ,
        !            89: if given.
        !            90: The default interval is 5 seconds.
1.2       deraadt    91: .It Ar display
1.1       deraadt    92: The
                     93: .Ar display
1.2       deraadt    94: argument expects to be one of:
1.1       deraadt    95: .Ic pigs ,
                     96: .Ic iostat ,
                     97: .Ic swap ,
                     98: .Ic mbufs ,
                     99: .Ic vmstat
                    100: or
                    101: .Ic netstat .
1.2       deraadt   102: These displays can also be requested interactively and are described in
1.1       deraadt   103: full detail below.
                    104: .It Ar refresh-interval
                    105: The
1.2       deraadt   106: .Ar refresh-interval
1.16      aaron     107: specifies the screen refresh time interval in seconds.
                    108: This is provided for backwards compatibility, and overrides the
1.31    ! jmc       109: .Ar wait
        !           110: interval specified with the
1.2       deraadt   111: .Fl w
                    112: flag.
1.31    ! jmc       113: The default interval is 5 seconds.
1.1       deraadt   114: .El
                    115: .Pp
                    116: Certain characters cause immediate action by
1.13      aaron     117: .Nm systat .
1.1       deraadt   118: These are
                    119: .Bl -tag -width Fl
                    120: .It Ic \&^L
                    121: Refresh the screen.
                    122: .It Ic \&^G
1.13      aaron     123: Print the name of the current
                    124: .Dq display
                    125: being shown in
1.1       deraadt   126: the lower window and the refresh interval.
                    127: .It Ic \&^Z
1.27      jmc       128: Suspend
1.13      aaron     129: .Nm systat .
1.1       deraadt   130: .It Ic \&:
                    131: Move the cursor to the command line and interpret the input
1.16      aaron     132: line typed as a command.
                    133: While entering a command the
1.1       deraadt   134: current character erase, word erase, and line kill characters
                    135: may be used.
                    136: .El
                    137: .Pp
1.13      aaron     138: The following commands are interpreted by the
                    139: .Dq global
1.1       deraadt   140: command interpreter.
                    141: .Bl -tag -width Fl
                    142: .It Ic help
                    143: Print the names of the available displays on the command line.
                    144: .It Ic load
                    145: Print the load average over the past 1, 5, and 15 minutes
                    146: on the command line.
                    147: .It Ic stop
                    148: Stop refreshing the screen.
                    149: .It Xo
                    150: .Op Ic start
                    151: .Op Ar number
                    152: .Xc
1.16      aaron     153: Start (continue) refreshing the screen.
                    154: If a second, numeric,
1.1       deraadt   155: argument is provided it is interpreted as a refresh interval
                    156: (in seconds).
                    157: Supplying only a number will set the refresh interval to this
                    158: value.
                    159: .It Ic quit
                    160: Exit
1.13      aaron     161: .Nm systat .
1.1       deraadt   162: (This may be abbreviated to
1.13      aaron     163: .Ic q . )
1.1       deraadt   164: .El
                    165: .Pp
                    166: The available displays are:
                    167: .Bl -tag -width Ic
                    168: .It Ic pigs
                    169: Display, in the lower window, those processes resident in main
                    170: memory and getting the
                    171: largest portion of the processor (the default display).
                    172: When less than 100% of the
                    173: processor is scheduled to user processes, the remaining time
1.13      aaron     174: is accounted to the
                    175: .Dq idle
                    176: process.
1.1       deraadt   177: .It Ic iostat
                    178: Display, in the lower window, statistics about processor use
1.16      aaron     179: and disk throughput.
                    180: Statistics on processor use appear as
                    181: bar graphs of the amount of time executing in user mode
                    182: .Pq Dq user ,
                    183: in user mode running low priority processes
                    184: .Pq Dq nice ,
                    185: in system mode
                    186: .Pq Dq system ,
                    187: and idle
                    188: .Pq Dq idle .
                    189: Statistics
1.1       deraadt   190: on disk throughput show, for each drive, kilobytes of data transferred,
1.2       deraadt   191: number of disk transactions performed, and time spent in disk accesses
1.16      aaron     192: (in milliseconds).
                    193: This information may be displayed as
                    194: bar graphs or as rows of numbers which scroll downward.
                    195: Bar graphs are shown by default.
1.1       deraadt   196: .Pp
                    197: The following commands are specific to the
                    198: .Ic iostat
                    199: display; the minimum unambiguous prefix may be supplied.
                    200: .Pp
                    201: .Bl -tag -width Fl -compact
                    202: .It Cm numbers
                    203: Show the disk
1.12      aaron     204: .Tn I/O
1.16      aaron     205: statistics in numeric form.
                    206: Values are displayed in numeric columns which scroll downward.
1.1       deraadt   207: .It Cm bars
                    208: Show the disk
                    209: .Tn I/O
                    210: statistics in bar graph form (default).
1.2       deraadt   211: .It Cm secs
                    212: Toggle the display of time in disk activity (the default is to
                    213: not display time).
1.1       deraadt   214: .El
                    215: .It Ic swap
1.12      aaron     216: Show information about swap space usage on all the
1.1       deraadt   217: swap areas compiled into the kernel.
                    218: The first column is the device name of the partition.
                    219: The next column is the total space available in the partition.
1.12      aaron     220: The
1.1       deraadt   221: .Ar Used
                    222: column indicates the total blocks used so far;
                    223: the graph shows the percentage of space in use on each partition.
1.8       aaron     224: If there is more than one swap partition in use,
1.1       deraadt   225: a total line is also shown.
1.8       aaron     226: Areas known to the kernel but not in use are shown as not available.
1.1       deraadt   227: .It Ic mbufs
                    228: Display, in the lower window, the number of mbufs allocated
1.16      aaron     229: for particular uses, i.e., data, socket structures, etc.
1.1       deraadt   230: .It Ic vmstat
                    231: Take over the entire display and show a (rather crowded) compendium
                    232: of statistics related to virtual memory usage, process scheduling,
1.14      alex      233: device interrupts, system name translation caching, disk
1.1       deraadt   234: .Tn I/O
                    235: etc.
                    236: .Pp
                    237: The upper left quadrant of the screen shows the number
1.8       aaron     238: of users logged in and the load average over the last 1, 5,
                    239: and 15 minute intervals.
1.1       deraadt   240: Below this line are statistics on memory utilization.
                    241: The first row of the table reports memory usage only among
1.8       aaron     242: active processes, that is, processes that have run in the previous
1.1       deraadt   243: twenty seconds.
                    244: The second row reports on memory usage of all processes.
                    245: The first column reports on the number of physical pages
                    246: claimed by processes.
1.29      jmc       247: The second column reports the same figure for
1.8       aaron     248: virtual pages, that is, the number of pages that would be
1.1       deraadt   249: needed if all processes had all of their pages.
1.8       aaron     250: Finally, the last column shows the number of physical pages
1.1       deraadt   251: on the free list.
                    252: .Pp
1.5       flipk     253: Below the memory display is a list of the average number of processes
1.13      aaron     254: (over the last refresh interval) that are runnable
                    255: .Pq Sq r ,
                    256: in disk wait other than paging
                    257: .Pq Sq d ,
                    258: sleeping
                    259: .Pq Sq s ,
                    260: and swapped out but desiring to run
                    261: .Pq Sq w .
1.1       deraadt   262: Below the queue length listing is a numerical listing and
                    263: a bar graph showing the amount of
1.16      aaron     264: system (shown as
                    265: .Ql = ) ,
                    266: user (shown as
                    267: .Ql > ) ,
                    268: nice (shown as
                    269: .Ql - ) ,
                    270: and idle time (shown as
1.29      jmc       271: .Ql \ \& ) .
1.1       deraadt   272: .Pp
1.12      aaron     273: To the right of the Proc display are statistics about
1.16      aaron     274: Context switches
                    275: .Pq Dq Csw ,
                    276: Traps
                    277: .Pq Dq Trp ,
                    278: Syscalls
                    279: .Pq Dq Sys ,
                    280: Interrupts
                    281: .Pq Dq Int ,
                    282: Soft interrupts
                    283: .Pq Dq Sof ,
                    284: and Faults
                    285: .Pq Dq Flt
1.7       deraadt   286: which have occurred during the last refresh interval.
1.5       flipk     287: .Pp
                    288: Below the CPU Usage graph are statistics on name translations.
1.1       deraadt   289: It lists the number of names translated in the previous interval,
                    290: the number and percentage of the translations that were
                    291: handled by the system wide name translation cache, and
                    292: the number and percentage of the translations that were
                    293: handled by the per process name translation cache.
                    294: .Pp
1.5       flipk     295: At the bottom left is the disk usage display.
                    296: It reports the number of seeks, transfers, number
                    297: of kilobyte blocks transferred per second averaged over the
                    298: refresh period of the display (by default, five seconds), and
                    299: the time spent in disk accesses.
                    300: .Pp
1.1       deraadt   301: Under the date in the upper right hand quadrant are statistics
                    302: on paging and swapping activity.
                    303: The first two columns report the average number of pages
                    304: brought in and out per second over the last refresh interval
                    305: due to page faults and the paging daemon.
                    306: The third and fourth columns report the average number of pages
                    307: brought in and out per second over the last refresh interval
                    308: due to swap requests initiated by the scheduler.
                    309: The first row of the display shows the average
1.8       aaron     310: number of disk transfers per second over the last refresh interval.
                    311: The second row of the display shows the average
1.1       deraadt   312: number of pages transferred per second over the last refresh interval.
                    313: .Pp
                    314: Running down the right hand side of the display is a breakdown
                    315: of the interrupts being handled by the system.
                    316: At the top of the list is the total interrupts per second
                    317: over the time interval.
                    318: The rest of the column breaks down the total on a device
                    319: by device basis.
                    320: Only devices that have interrupted at least once since boot time are shown.
1.5       flipk     321: .Pp
                    322: Below the SWAPPING display and slightly to the left of the Interrupts
1.18      aaron     323: display is a list of virtual memory statistics.
                    324: The abbreviations are:
1.5       flipk     325: .Bl -tag -compact -width XXXXXX -offset indent
1.21      deraadt   326: .It forks
                    327: process forks
                    328: .It fkppw
                    329: forks where parent waits
                    330: .It fksvm
                    331: forks where vmspace is shared
                    332: .It pwait
                    333: fault had to wait on a page
                    334: .It relck
                    335: fault relock called
                    336: .It rlkok
                    337: fault relock is successful
                    338: .It noram
                    339: faults out of ram
                    340: .It ndcpy
                    341: number of times fault clears "need copy"
                    342: .It fltcp
                    343: number of times fault promotes with copy
                    344: .It zfod
                    345: fault promotes with zerofill
1.5       flipk     346: .It cow
1.21      deraadt   347: number of times fault anon cow
                    348: .It fmin
                    349: min number of free pages
                    350: .It ftarg
                    351: target number of free pages
                    352: .It itarg
                    353: target number of inactive pages
                    354: .It wired
                    355: wired pages
1.25      deraadt   356: .It pdfre
1.21      deraadt   357: pages daemon freed since boot
                    358: .It pdscn
                    359: pages daemon scanned since boot
1.5       flipk     360: .El
                    361: .Pp
1.13      aaron     362: The
                    363: .Ql %zfod
                    364: value is more interesting when observed over a long
1.5       flipk     365: period, such as from boot time (see the
                    366: .Cm boot
                    367: option below).
1.1       deraadt   368: .Pp
                    369: The following commands are specific to the
                    370: .Ic vmstat
                    371: display; the minimum unambiguous prefix may be supplied.
                    372: .Pp
1.16      aaron     373: .Bl -tag -width Ds -compact
1.1       deraadt   374: .It Cm boot
                    375: Display cumulative statistics since the system was booted.
                    376: .It Cm run
                    377: Display statistics as a running total from the point this
                    378: command is given.
                    379: .It Cm time
                    380: Display statistics averaged over the refresh interval (the default).
                    381: .It Cm zero
                    382: Reset running statistics to zero.
                    383: .El
                    384: .It Ic netstat
1.16      aaron     385: Display, in the lower window, network connections.
                    386: By default, network servers awaiting requests are not displayed.
                    387: Each address
                    388: is displayed in the format
                    389: .Dq host.port ,
                    390: with each shown symbolically, when possible.
                    391: It is possible to have addresses displayed numerically,
1.1       deraadt   392: limit the display to a set of ports, hosts, and/or protocols
                    393: (the minimum unambiguous prefix may be supplied):
1.16      aaron     394: .Bl -tag -width Ar
1.1       deraadt   395: .It Cm all
                    396: Toggle the displaying of server processes awaiting requests (this
                    397: is the equivalent of the
                    398: .Fl a
                    399: flag to
1.13      aaron     400: .Xr netstat 1 ) .
1.1       deraadt   401: .It Cm numbers
                    402: Display network addresses numerically.
                    403: .It Cm names
                    404: Display network addresses symbolically.
1.16      aaron     405: .It Cm protocol
1.1       deraadt   406: Display only network connections using the indicated protocol
1.13      aaron     407: (currently either
                    408: .Dq tcp
                    409: or
                    410: .Dq udp ) .
1.1       deraadt   411: .It Cm ignore Op Ar items
                    412: Do not display information about connections associated with
1.16      aaron     413: the specified hosts or ports.
                    414: Hosts and ports may be specified
                    415: by name
                    416: .Pf ( Dq vangogh ,
                    417: .Dq ftp ) ,
                    418: or numerically.
                    419: Host addresses
                    420: use the Internet dot notation
                    421: .Pq Dq 128.32.0.9 .
                    422: Multiple items
1.1       deraadt   423: may be specified with a single command by separating them with
                    424: spaces.
                    425: .It Cm display Op Ar items
                    426: Display information about the connections associated with the
1.16      aaron     427: specified hosts or ports.
                    428: As for
1.13      aaron     429: .Ar ignore ,
1.8       aaron     430: .Ar items
1.1       deraadt   431: may be names or numbers.
                    432: .It Cm show Op Ar ports\&|hosts
                    433: Show, on the command line, the currently selected protocols,
1.16      aaron     434: hosts, and ports.
                    435: Hosts and ports which are being ignored are prefixed with a
1.30      jmc       436: .Ql \&! .
1.16      aaron     437: If
1.1       deraadt   438: .Ar ports
                    439: or
                    440: .Ar hosts
                    441: is supplied as an argument to
1.13      aaron     442: .Cm show ,
1.1       deraadt   443: then only the requested information will be displayed.
                    444: .It Cm reset
                    445: Reset the port, host, and protocol matching mechanisms to the default
                    446: (any protocol, port, or host).
                    447: .El
                    448: .El
                    449: .Pp
                    450: Commands to switch between displays may be abbreviated to the
1.16      aaron     451: minimum unambiguous prefix; for example,
                    452: .Dq io
                    453: for
                    454: .Dq iostat .
1.1       deraadt   455: Certain information may be discarded when the screen size is
1.16      aaron     456: insufficient for display.
                    457: For example, on a machine with 10 drives the
1.1       deraadt   458: .Ic iostat
1.16      aaron     459: bar graph displays only 3 drives on a 24 line terminal.
                    460: When a bar graph would overflow the allotted screen space it is
                    461: truncated and the actual value is printed
                    462: .Dq over top
                    463: of the bar.
1.1       deraadt   464: .Pp
                    465: The following commands are common to each display which shows
1.16      aaron     466: information about disk drives.
                    467: These commands are used to
1.1       deraadt   468: select a set of drives to report on, should your system have
                    469: more drives configured than can normally be displayed on the
                    470: screen.
                    471: .Pp
                    472: .Bl -tag -width Tx -compact
                    473: .It Cm ignore Op Ar drives
1.16      aaron     474: Do not display information about the drives indicated.
                    475: Multiple drives may be specified, separated by spaces.
1.1       deraadt   476: .It Cm display Op Ar drives
1.16      aaron     477: Display information about the drives indicated.
                    478: Multiple drives may be specified, separated by spaces.
1.1       deraadt   479: .El
                    480: .Sh FILES
                    481: .Bl -tag -width /etc/networks -compact
                    482: .It Pa /etc/hosts
1.22      miod      483: host names
1.1       deraadt   484: .It Pa /etc/networks
1.22      miod      485: network names
1.1       deraadt   486: .It Pa /etc/services
1.22      miod      487: port names
1.1       deraadt   488: .El
1.15      aaron     489: .Sh SEE ALSO
                    490: .Xr kill 1 ,
                    491: .Xr ps 1 ,
                    492: .Xr top 1 ,
                    493: .Xr renice 8
1.1       deraadt   494: .Sh HISTORY
                    495: The
1.13      aaron     496: .Nm
1.1       deraadt   497: program appeared in
                    498: .Bx 4.3 .
                    499: .Sh BUGS
1.10      aaron     500: Takes 2-10 percent of the CPU.
1.1       deraadt   501: Certain displays presume a minimum of 80 characters per line.
                    502: The
                    503: .Ic vmstat
                    504: display looks out of place because it is (it was added in as
                    505: a separate display rather than created as a new program).