[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.28

1.28    ! millert     1: .\"    $OpenBSD: systat.1,v 1.27 2003/04/15 19:57:10 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.19      aaron      84: .Bl -tag -width Ds
1.2       deraadt    85: .It Ar display
1.1       deraadt    86: The
                     87: .Ar display
1.2       deraadt    88: argument expects to be one of:
1.1       deraadt    89: .Ic pigs ,
                     90: .Ic iostat ,
                     91: .Ic swap ,
                     92: .Ic mbufs ,
                     93: .Ic vmstat
                     94: or
                     95: .Ic netstat .
1.2       deraadt    96: These displays can also be requested interactively and are described in
1.1       deraadt    97: full detail below.
                     98: .It Ar refresh-interval
                     99: The
1.2       deraadt   100: .Ar refresh-interval
1.16      aaron     101: specifies the screen refresh time interval in seconds.
                    102: This is provided for backwards compatibility, and overrides the
1.2       deraadt   103: .Ar refresh-interval
                    104: specified with the
                    105: .Fl w
                    106: flag.
1.1       deraadt   107: .El
                    108: .Pp
                    109: Certain characters cause immediate action by
1.13      aaron     110: .Nm systat .
1.1       deraadt   111: These are
                    112: .Bl -tag -width Fl
                    113: .It Ic \&^L
                    114: Refresh the screen.
                    115: .It Ic \&^G
1.13      aaron     116: Print the name of the current
                    117: .Dq display
                    118: being shown in
1.1       deraadt   119: the lower window and the refresh interval.
                    120: .It Ic \&^Z
1.27      jmc       121: Suspend
1.13      aaron     122: .Nm systat .
1.1       deraadt   123: .It Ic \&:
                    124: Move the cursor to the command line and interpret the input
1.16      aaron     125: line typed as a command.
                    126: While entering a command the
1.1       deraadt   127: current character erase, word erase, and line kill characters
                    128: may be used.
                    129: .El
                    130: .Pp
1.13      aaron     131: The following commands are interpreted by the
                    132: .Dq global
1.1       deraadt   133: command interpreter.
                    134: .Bl -tag -width Fl
                    135: .It Ic help
                    136: Print the names of the available displays on the command line.
                    137: .It Ic load
                    138: Print the load average over the past 1, 5, and 15 minutes
                    139: on the command line.
                    140: .It Ic stop
                    141: Stop refreshing the screen.
                    142: .It Xo
                    143: .Op Ic start
                    144: .Op Ar number
                    145: .Xc
1.16      aaron     146: Start (continue) refreshing the screen.
                    147: If a second, numeric,
1.1       deraadt   148: argument is provided it is interpreted as a refresh interval
                    149: (in seconds).
                    150: Supplying only a number will set the refresh interval to this
                    151: value.
                    152: .It Ic quit
                    153: Exit
1.13      aaron     154: .Nm systat .
1.1       deraadt   155: (This may be abbreviated to
1.13      aaron     156: .Ic q . )
1.1       deraadt   157: .El
                    158: .Pp
                    159: The available displays are:
                    160: .Bl -tag -width Ic
                    161: .It Ic pigs
                    162: Display, in the lower window, those processes resident in main
                    163: memory and getting the
                    164: largest portion of the processor (the default display).
                    165: When less than 100% of the
                    166: processor is scheduled to user processes, the remaining time
1.13      aaron     167: is accounted to the
                    168: .Dq idle
                    169: process.
1.1       deraadt   170: .It Ic iostat
                    171: Display, in the lower window, statistics about processor use
1.16      aaron     172: and disk throughput.
                    173: Statistics on processor use appear as
                    174: bar graphs of the amount of time executing in user mode
                    175: .Pq Dq user ,
                    176: in user mode running low priority processes
                    177: .Pq Dq nice ,
                    178: in system mode
                    179: .Pq Dq system ,
                    180: and idle
                    181: .Pq Dq idle .
                    182: Statistics
1.1       deraadt   183: on disk throughput show, for each drive, kilobytes of data transferred,
1.2       deraadt   184: number of disk transactions performed, and time spent in disk accesses
1.16      aaron     185: (in milliseconds).
                    186: This information may be displayed as
                    187: bar graphs or as rows of numbers which scroll downward.
                    188: Bar graphs are shown by default.
1.1       deraadt   189: .Pp
                    190: The following commands are specific to the
                    191: .Ic iostat
                    192: display; the minimum unambiguous prefix may be supplied.
                    193: .Pp
                    194: .Bl -tag -width Fl -compact
                    195: .It Cm numbers
                    196: Show the disk
1.12      aaron     197: .Tn I/O
1.16      aaron     198: statistics in numeric form.
                    199: Values are displayed in numeric columns which scroll downward.
1.1       deraadt   200: .It Cm bars
                    201: Show the disk
                    202: .Tn I/O
                    203: statistics in bar graph form (default).
1.2       deraadt   204: .It Cm secs
                    205: Toggle the display of time in disk activity (the default is to
                    206: not display time).
1.1       deraadt   207: .El
                    208: .It Ic swap
1.12      aaron     209: Show information about swap space usage on all the
1.1       deraadt   210: swap areas compiled into the kernel.
                    211: The first column is the device name of the partition.
                    212: The next column is the total space available in the partition.
1.12      aaron     213: The
1.1       deraadt   214: .Ar Used
                    215: column indicates the total blocks used so far;
                    216: the graph shows the percentage of space in use on each partition.
1.8       aaron     217: If there is more than one swap partition in use,
1.1       deraadt   218: a total line is also shown.
1.8       aaron     219: Areas known to the kernel but not in use are shown as not available.
1.1       deraadt   220: .It Ic mbufs
                    221: Display, in the lower window, the number of mbufs allocated
1.16      aaron     222: for particular uses, i.e., data, socket structures, etc.
1.1       deraadt   223: .It Ic vmstat
                    224: Take over the entire display and show a (rather crowded) compendium
                    225: of statistics related to virtual memory usage, process scheduling,
1.14      alex      226: device interrupts, system name translation caching, disk
1.1       deraadt   227: .Tn I/O
                    228: etc.
                    229: .Pp
                    230: The upper left quadrant of the screen shows the number
1.8       aaron     231: of users logged in and the load average over the last 1, 5,
                    232: and 15 minute intervals.
1.1       deraadt   233: Below this line are statistics on memory utilization.
                    234: The first row of the table reports memory usage only among
1.8       aaron     235: active processes, that is, processes that have run in the previous
1.1       deraadt   236: twenty seconds.
                    237: The second row reports on memory usage of all processes.
                    238: The first column reports on the number of physical pages
                    239: claimed by processes.
                    240: The second column reports the number of physical pages that
1.8       aaron     241: are devoted to read-only text pages.
1.1       deraadt   242: The third and fourth columns report the same two figures for
1.8       aaron     243: virtual pages, that is, the number of pages that would be
1.1       deraadt   244: needed if all processes had all of their pages.
1.8       aaron     245: Finally, the last column shows the number of physical pages
1.1       deraadt   246: on the free list.
                    247: .Pp
1.5       flipk     248: Below the memory display is a list of the average number of processes
1.13      aaron     249: (over the last refresh interval) that are runnable
                    250: .Pq Sq r ,
                    251: in page wait
                    252: .Pq Sq p ,
                    253: in disk wait other than paging
                    254: .Pq Sq d ,
                    255: sleeping
                    256: .Pq Sq s ,
                    257: and swapped out but desiring to run
                    258: .Pq Sq w .
1.1       deraadt   259: Below the queue length listing is a numerical listing and
                    260: a bar graph showing the amount of
1.16      aaron     261: system (shown as
                    262: .Ql = ) ,
                    263: user (shown as
                    264: .Ql > ) ,
                    265: nice (shown as
                    266: .Ql - ) ,
                    267: and idle time (shown as
1.26      jason     268: .Ql \  ) .
1.1       deraadt   269: .Pp
1.12      aaron     270: To the right of the Proc display are statistics about
1.16      aaron     271: Context switches
                    272: .Pq Dq Csw ,
                    273: Traps
                    274: .Pq Dq Trp ,
                    275: Syscalls
                    276: .Pq Dq Sys ,
                    277: Interrupts
                    278: .Pq Dq Int ,
                    279: Soft interrupts
                    280: .Pq Dq Sof ,
                    281: and Faults
                    282: .Pq Dq Flt
1.7       deraadt   283: which have occurred during the last refresh interval.
1.5       flipk     284: .Pp
                    285: Below the CPU Usage graph are statistics on name translations.
1.1       deraadt   286: It lists the number of names translated in the previous interval,
                    287: the number and percentage of the translations that were
                    288: handled by the system wide name translation cache, and
                    289: the number and percentage of the translations that were
                    290: handled by the per process name translation cache.
                    291: .Pp
1.5       flipk     292: At the bottom left is the disk usage display.
                    293: It reports the number of seeks, transfers, number
                    294: of kilobyte blocks transferred per second averaged over the
                    295: refresh period of the display (by default, five seconds), and
                    296: the time spent in disk accesses.
                    297: .Pp
1.1       deraadt   298: Under the date in the upper right hand quadrant are statistics
                    299: on paging and swapping activity.
                    300: The first two columns report the average number of pages
                    301: brought in and out per second over the last refresh interval
                    302: due to page faults and the paging daemon.
                    303: The third and fourth columns report the average number of pages
                    304: brought in and out per second over the last refresh interval
                    305: due to swap requests initiated by the scheduler.
                    306: The first row of the display shows the average
1.8       aaron     307: number of disk transfers per second over the last refresh interval.
                    308: The second row of the display shows the average
1.1       deraadt   309: number of pages transferred per second over the last refresh interval.
                    310: .Pp
                    311: Running down the right hand side of the display is a breakdown
                    312: of the interrupts being handled by the system.
                    313: At the top of the list is the total interrupts per second
                    314: over the time interval.
                    315: The rest of the column breaks down the total on a device
                    316: by device basis.
                    317: Only devices that have interrupted at least once since boot time are shown.
1.5       flipk     318: .Pp
                    319: Below the SWAPPING display and slightly to the left of the Interrupts
1.18      aaron     320: display is a list of virtual memory statistics.
                    321: The abbreviations are:
1.5       flipk     322: .Bl -tag -compact -width XXXXXX -offset indent
1.21      deraadt   323: .It forks
                    324: process forks
                    325: .It fkppw
                    326: forks where parent waits
                    327: .It fksvm
                    328: forks where vmspace is shared
                    329: .It pwait
                    330: fault had to wait on a page
                    331: .It relck
                    332: fault relock called
                    333: .It rlkok
                    334: fault relock is successful
                    335: .It noram
                    336: faults out of ram
                    337: .It ndcpy
                    338: number of times fault clears "need copy"
                    339: .It fltcp
                    340: number of times fault promotes with copy
                    341: .It zfod
                    342: fault promotes with zerofill
1.5       flipk     343: .It cow
1.21      deraadt   344: number of times fault anon cow
                    345: .It fmin
                    346: min number of free pages
                    347: .It ftarg
                    348: target number of free pages
                    349: .It itarg
                    350: target number of inactive pages
                    351: .It wired
                    352: wired pages
1.25      deraadt   353: .It pdfre
1.21      deraadt   354: pages daemon freed since boot
                    355: .It pdscn
                    356: pages daemon scanned since boot
1.5       flipk     357: .El
                    358: .Pp
1.13      aaron     359: The
                    360: .Ql %zfod
                    361: value is more interesting when observed over a long
1.5       flipk     362: period, such as from boot time (see the
                    363: .Cm boot
                    364: option below).
1.1       deraadt   365: .Pp
                    366: The following commands are specific to the
                    367: .Ic vmstat
                    368: display; the minimum unambiguous prefix may be supplied.
                    369: .Pp
1.16      aaron     370: .Bl -tag -width Ds -compact
1.1       deraadt   371: .It Cm boot
                    372: Display cumulative statistics since the system was booted.
                    373: .It Cm run
                    374: Display statistics as a running total from the point this
                    375: command is given.
                    376: .It Cm time
                    377: Display statistics averaged over the refresh interval (the default).
                    378: .It Cm zero
                    379: Reset running statistics to zero.
                    380: .El
                    381: .It Ic netstat
1.16      aaron     382: Display, in the lower window, network connections.
                    383: By default, network servers awaiting requests are not displayed.
                    384: Each address
                    385: is displayed in the format
                    386: .Dq host.port ,
                    387: with each shown symbolically, when possible.
                    388: It is possible to have addresses displayed numerically,
1.1       deraadt   389: limit the display to a set of ports, hosts, and/or protocols
                    390: (the minimum unambiguous prefix may be supplied):
1.16      aaron     391: .Bl -tag -width Ar
1.1       deraadt   392: .It Cm all
                    393: Toggle the displaying of server processes awaiting requests (this
                    394: is the equivalent of the
                    395: .Fl a
                    396: flag to
1.13      aaron     397: .Xr netstat 1 ) .
1.1       deraadt   398: .It Cm numbers
                    399: Display network addresses numerically.
                    400: .It Cm names
                    401: Display network addresses symbolically.
1.16      aaron     402: .It Cm protocol
1.1       deraadt   403: Display only network connections using the indicated protocol
1.13      aaron     404: (currently either
                    405: .Dq tcp
                    406: or
                    407: .Dq udp ) .
1.1       deraadt   408: .It Cm ignore Op Ar items
                    409: Do not display information about connections associated with
1.16      aaron     410: the specified hosts or ports.
                    411: Hosts and ports may be specified
                    412: by name
                    413: .Pf ( Dq vangogh ,
                    414: .Dq ftp ) ,
                    415: or numerically.
                    416: Host addresses
                    417: use the Internet dot notation
                    418: .Pq Dq 128.32.0.9 .
                    419: Multiple items
1.1       deraadt   420: may be specified with a single command by separating them with
                    421: spaces.
                    422: .It Cm display Op Ar items
                    423: Display information about the connections associated with the
1.16      aaron     424: specified hosts or ports.
                    425: As for
1.13      aaron     426: .Ar ignore ,
1.8       aaron     427: .Ar items
1.1       deraadt   428: may be names or numbers.
                    429: .It Cm show Op Ar ports\&|hosts
                    430: Show, on the command line, the currently selected protocols,
1.16      aaron     431: hosts, and ports.
                    432: Hosts and ports which are being ignored are prefixed with a
                    433: .Ql ! .
                    434: If
1.1       deraadt   435: .Ar ports
                    436: or
                    437: .Ar hosts
                    438: is supplied as an argument to
1.13      aaron     439: .Cm show ,
1.1       deraadt   440: then only the requested information will be displayed.
                    441: .It Cm reset
                    442: Reset the port, host, and protocol matching mechanisms to the default
                    443: (any protocol, port, or host).
                    444: .El
                    445: .El
                    446: .Pp
                    447: Commands to switch between displays may be abbreviated to the
1.16      aaron     448: minimum unambiguous prefix; for example,
                    449: .Dq io
                    450: for
                    451: .Dq iostat .
1.1       deraadt   452: Certain information may be discarded when the screen size is
1.16      aaron     453: insufficient for display.
                    454: For example, on a machine with 10 drives the
1.1       deraadt   455: .Ic iostat
1.16      aaron     456: bar graph displays only 3 drives on a 24 line terminal.
                    457: When a bar graph would overflow the allotted screen space it is
                    458: truncated and the actual value is printed
                    459: .Dq over top
                    460: of the bar.
1.1       deraadt   461: .Pp
                    462: The following commands are common to each display which shows
1.16      aaron     463: information about disk drives.
                    464: These commands are used to
1.1       deraadt   465: select a set of drives to report on, should your system have
                    466: more drives configured than can normally be displayed on the
                    467: screen.
                    468: .Pp
                    469: .Bl -tag -width Tx -compact
                    470: .It Cm ignore Op Ar drives
1.16      aaron     471: Do not display information about the drives indicated.
                    472: Multiple drives may be specified, separated by spaces.
1.1       deraadt   473: .It Cm display Op Ar drives
1.16      aaron     474: Display information about the drives indicated.
                    475: Multiple drives may be specified, separated by spaces.
1.1       deraadt   476: .El
                    477: .Sh FILES
                    478: .Bl -tag -width /etc/networks -compact
                    479: .It Pa /etc/hosts
1.22      miod      480: host names
1.1       deraadt   481: .It Pa /etc/networks
1.22      miod      482: network names
1.1       deraadt   483: .It Pa /etc/services
1.22      miod      484: port names
1.1       deraadt   485: .El
1.15      aaron     486: .Sh SEE ALSO
                    487: .Xr kill 1 ,
                    488: .Xr ps 1 ,
                    489: .Xr top 1 ,
                    490: .Xr renice 8
1.1       deraadt   491: .Sh HISTORY
                    492: The
1.13      aaron     493: .Nm
1.1       deraadt   494: program appeared in
                    495: .Bx 4.3 .
                    496: .Sh BUGS
1.10      aaron     497: Takes 2-10 percent of the CPU.
1.1       deraadt   498: Certain displays presume a minimum of 80 characters per line.
                    499: The
                    500: .Ic vmstat
                    501: display looks out of place because it is (it was added in as
                    502: a separate display rather than created as a new program).