1 .\" Copyright (c) 1985, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)systat.1 8.2 (Berkeley) 12/30/93
29 .\" $FreeBSD: src/usr.bin/systat/systat.1,v 1.23.2.9 2002/12/29 16:35:40 schweikh Exp $
36 .Nd display system statistics on a crt
40 .Op Ar refresh-interval
44 utility displays various system statistics in a screen oriented fashion
45 using the curses screen display library,
50 is running the screen is usually divided into two windows (an exception
55 displays which uses the entire screen).
56 The upper window depicts the current system load average.
57 The information displayed in the lower window may vary, depending on
59 The last line on the screen is reserved for user input and error messages.
63 displays the processes getting the largest percentage of the processor
65 Other displays show swap space usage, disk
69 virtual memory statistics (a la
71 network ``mbuf'' utilization,
74 and network connections (a la
77 Input is interpreted at two different levels.
78 A ``global'' command interpreter processes all keyboard input.
79 If this command interpreter fails to recognize a command, the
80 input line is passed to a per-display command interpreter.
81 This allows each display to have certain display-specific commands.
84 .Bl -tag -width "refresh_interval"
109 These displays can also be requested interactively (without the
113 .It Ar refresh-interval
116 specifies the screen refresh time interval in seconds.
117 Default is 5 seconds.
120 Certain characters cause immediate action by
127 Print the name of the current ``display'' being shown in
128 the lower window and the refresh interval.
130 Move the cursor to the command line and interpret the input
131 line typed as a command.
132 While entering a command the current character erase, word erase,
133 and line kill characters may be used.
136 The following commands are interpreted by the ``global'' command interpreter.
139 Print the names of the available displays on the command line.
141 Print the load average over the past 1, 5, and 15 minutes on the command line.
143 Stop refreshing the screen.
144 .It Oo Ic start Oc Op Ar number
145 Start (continue) refreshing the screen.
146 If a second, numeric, argument is provided it is interpreted as a
147 refresh interval (in seconds).
148 Supplying only a number will set the refresh interval to this value.
152 (This may be abbreviated to
156 The available displays are:
159 Display, in the lower window, those processes resident in main
160 memory and getting the
161 largest portion of the processor (the default display).
162 When less than 100% of the
163 processor is scheduled to user processes, the remaining time
164 is accounted to the ``idle'' process.
166 Display, in the lower window, statistics about messages received and
167 transmitted by the Internet Control Message Protocol
169 The left half of the screen displays information about received packets,
170 and the right half displays information regarding transmitted packets.
174 display understands two commands:
180 command is used to select one of four display modes, given as its argument:
182 .Bl -tag -width absoluteXX -compact
184 Show the rate of change of each value in packets per second (the default).
186 Show the rate of change of each value in packets per refresh interval.
188 Show the total change of each value since the display was last reset.
190 Show the absolute value of each statistic.
195 command resets the baseline for
200 command with no argument will display the current mode in the command line.
202 This display is like the
204 display, but displays statistics for
207 Otherwise identical to the
209 display, except that it displays
218 except that it displays
228 Display, in the lower window, statistics about network throughput on
229 a per-interface basis.
231 Display, in the lower window, statistics about processor use
233 Statistics on processor use appear as
234 bar graphs of the amount of time executing in user mode (`user'),
235 in user mode running low priority processes (`nice'), in
236 system mode (`system'), in interrupt mode (`interrupt'),
238 Statistics on disk throughput show, for each drive, megabytes per second,
239 average number of disk transactions per second, and
240 average kilobytes of data per transaction.
241 This information may be
242 displayed as bar graphs or as rows of numbers which scroll downward.
243 Bar graphs are shown by default.
245 The following commands are specific to the
247 display; the minimum unambiguous prefix may be supplied.
249 .Bl -tag -width Fl -compact
253 statistics in numeric form.
254 Values are displayed in numeric columns which scroll downward.
258 statistics in bar graph form (default).
260 Toggle the display of kilobytes per transaction.
261 (the default is to not display kilobytes per transaction).
264 Display, in the lower window,
265 the current values of available hardware sensors,
266 in a format similar to that of
269 The following commands are specific to the
271 display; the minimum unambiguous prefix may be supplied.
273 .Bl -tag -width Fl -compact
274 .It Ic type Op Ar type ...
275 Display only the sensors which match the specified
277 Multiple types may be specified,
279 If no types are specified,
280 all available sensors will be displayed.
301 .It Ic match Op Ar device ...
302 Display only the sensors match the specified
304 Multiple devices may be specified,
306 If no devices are specified,
307 all available sensors will be displayed.
308 A device type could be specified by using
311 in the place of the device unit.
317 Show information about swap space usage on all the
318 swap areas compiled into the kernel.
319 The first column is the device name of the partition.
320 The next column is the total space available in the partition.
321 The `Used' column indicates the total blocks used so far;
322 the graph shows the percentage of space in use on each partition.
323 If there are more than one swap partition in use,
324 a total line is also shown.
325 Areas known to the kernel, but not in use are shown as not available.
327 Display, in the lower window, the number of mbufs allocated
328 for particular uses, i.e.\& data, socket structures, etc.
330 Take over the entire display and show a (rather crowded) compendium
331 of statistics related to virtual memory usage, process scheduling,
332 device interrupts, system name translation cacheing, disk
336 The upper left quadrant of the screen shows the number
337 of users logged in and the load average over the last one, five,
338 and fifteen minute intervals.
340 Below this line are statistics on memory utilization.
341 The first row (`Active') reports memory usage in bytes
342 only among active processes,
343 that is processes that have run in the previous twenty seconds.
344 The second row (`Kernel') reports memory usage in bytes by the kernel.
345 The third row (`Free .. i+c+f') shows freeable memory in bytes,
346 which is inactive + cache + free.
347 I.e.\& Free i+c+f includes inactive pages, which aren't quite free,
348 but they will be made free given enough memory pressure.
349 Finally the last row (`Total') shows total system memory in bytes.
350 The second column reports on memory usage of all processes.
351 The first row (`VM-rss') shows bytes for total RSS.
352 This is basically how many pages the system is mapping to user processes.
353 Due to sharing this can be a large value.
354 The second row (`VM-swp') reports on swap, first swap used in bytes,
355 then, after `/', total swap in bytes.
357 Below the memory display is a list of the
358 average number of processes (over the last refresh interval)
359 that are runnable (`r'), in page wait (`p'),
360 in disk wait other than paging (`d'),
361 sleeping (`s'), and swapped out but desiring to run (`w').
362 The row also shows the average number of context switches (`Csw'),
363 traps (`Trp'; includes page faults), system calls (`Sys'), interrupts (`Int'),
364 network software interrupts (`Sof'), and page faults (`Flt').
366 Below the process queue length listing is a listing of
368 usage, a numerical listing and a bar graph showing the amount of
369 system (`='), interrupt (`+'), user (`>'), nice (`-'), and idle time (` ').
373 usage display are statistics on name translations and execs.
374 It lists the number of path names translated
375 in the previous interval (`Path-lookups'),
376 the number and percentage of the path lookups that were
377 handled by the name translation cache,
378 the average number of path components in path lookups (`Components') and,
381 per second (`Execs').
383 At the bottom left is the disk usage display.
384 It reports the number of
385 kilobytes per transaction (`KB/t'),
386 read transactions per second (`tpr/s'),
387 megabytes per second in read transaction (`MBr/s'),
388 write transactions per second (`tpw/s'),
389 megabytes per second in write transaction (`MBw/s') and
390 the percentage of the time the disk was busy (`% busy') averaged
391 over the refresh period of the display (by default, five seconds).
392 The system keeps statistics on most every storage device.
393 In general, up to seven devices are displayed.
394 The devices displayed by default are the
395 first devices in the kernel's device list.
396 Some devices are not shown by default, see
403 for details on the devstat system.
405 If at most 4 disk devices are shown,
406 extended virtual memory statistics are shown right to disk usage:
407 pages non-optimized zero filled on demand (`nzfod'),
408 pages optimized zero filled on demand (`ozfod'),
409 slow (i.e.\& non-optimized) zero fills percentage (`%sloz'),
410 total pages freed (`tfree').
412 Under the date in the upper right hand quadrant are statistics
413 on paging and swapping activity.
414 The first two columns (`VN PAGER') report the average number of bytes
415 brought in and out per second over the last refresh interval
416 due to page faults and the paging daemon.
417 The third and fourth columns (`SWAP PAGER') report the average number of bytes
418 brought in and out per second over the last refresh interval
419 due to swap requests initiated by the scheduler.
420 The first row (`bytes') of the display shows the average
421 number of bytes transferred per second over the last refresh interval;
422 the second row (`count') of the display shows the average
423 number of disk transfers per second over the last refresh interval;
424 this usually matches number of pages transferred
425 per second over the last refresh interval.
427 Below the paging statistics is a column of lines regarding the virtual
428 memory system which list the average number of
429 bytes in pages zero filled on demand (`zfod')
430 (shown with extended virtual memory statistics if screen space permits),
431 bytes in pages copied on write (`cow'),
432 bytes in pages wired down (`wire'),
433 bytes in active pages (`act'),
434 bytes in inactive pages (`inact'),
435 bytes in pages on the buffer cache queue (`cache'),
436 bytes in free pages (`free'),
437 pages freed by the page daemon (`daefr'),
438 pages freed by exiting processes (`prcfr'),
439 pages reactivated from the free list (`react'),
440 times the page daemon was awakened (`pdwak'),
441 pages analyzed by the page daemon (`pdpgs'),
443 intransit blocking page faults (`intrn')
444 per second over the refresh interval.
446 At the bottom of this column are lines showing the
447 amount of memory, in bytes, used for the buffer cache (`buf'),
448 number of dirty buffers in the buffer cache (`dirtybuf'),
449 number of active vnodes (`activ-vp'),
450 number of cached vnodes (`cachd-vp'),
452 number of inactive vnodes (`inact-vp').
454 Running down the right hand side of the display is a breakdown
455 of the interrupts being handled by the system (`Interrupts').
456 At the top of the list is the total interrupts per second
457 over the time interval (`total').
458 The rest of the column breaks down the total on a device by device basis.
459 Only devices that have interrupted at least once since boot time are shown.
461 The following commands are specific to the
463 display; the minimum unambiguous prefix may be supplied.
465 .Bl -tag -width Ar -compact
467 Display cumulative statistics since the system was booted.
469 Display statistics as a running total from the point this command is given.
471 Display statistics averaged over the refresh interval (the default).
473 Reset running statistics to zero.
476 Display total and per
478 statistics, including
480 timer interrupts (`timer'),
482 (Inter-Processor Interrupts) (`ipi'),
483 external interrupts (i.e.\& not timer or ipi) (`extint'),
485 time breakdown (`user%', `sys%', `intr%', and `idle%'),
487 collisions (`smpcol'), and name of last colliding item (`label').
495 Display, in the lower window, network connections.
496 By default, network servers awaiting requests are not displayed.
497 Each address is displayed in the format ``host.port'',
498 with each shown symbolically, when possible.
499 It is possible to have addresses displayed numerically,
500 limit the display to a set of ports, hosts, and/or protocols
501 (the minimum unambiguous prefix may be supplied):
503 .Bl -tag -width Ar -compact
505 Toggle the displaying of server processes awaiting requests (this
506 is the equivalent of the
511 Display network addresses numerically.
513 Display network addresses symbolically.
514 .It Ic proto Ar protocol
515 Display only network connections using the indicated
517 Supported protocols are
522 .It Ic ignore Op Ar items
523 Do not display information about connections associated with
524 the specified hosts or ports.
525 Hosts and ports may be specified
526 by name (``vangogh'', ``ftp''), or numerically.
527 Host addresses use the Internet dot notation (``128.32.0.9'').
529 may be specified with a single command by separating them with spaces.
530 .It Ic display Op Ar items
531 Display information about the connections associated with the
532 specified hosts or ports.
536 may be names or numbers.
537 .It Ic show Op Cm ports | protos | hosts
538 Show, on the command line, the currently selected protocols, hosts, and ports.
539 Hosts and ports which are being ignored are prefixed with a `!'.
544 is supplied as an argument to
546 then only the requested information will be displayed.
548 Reset the port, host, and protocol matching mechanisms to the default
549 (any protocol, port, or host).
552 Display aggregate and per-connection TCP receive and transmit rates.
553 Only active TCP connections originated or terminated by the host
556 Display packet filter
558 state information for states which are
559 actively passing data.
562 to be active to be meaningful
563 but is capable of displaying connection state for all packet traffic
564 passing through the machine, even for connections that do not originate
565 or terminate on the machine.
567 You need a wide ~100 column window to display
570 IPV6 addresses are truncated (just the first two and last two words
571 are displayed) for brevity.
572 Generally speaking `rcv' is data received
573 by the first IP address and `snd' is data sent to the second IP address.
575 the total sum of data sent plus received tracked by the state.
577 The display is sorted by average rx+tx bandwidth calculated on a 1/8 decay
578 curve to prevent fields from jumping around too much.
580 are selected based on the largest bandwidth measurement for uniformity.
581 Note that two states will be present for any connection operating over NAT.
582 Needs root privilege.
584 Display packet filter altq statistics.
585 The ALTQ operates in conjunction with the packet filter (pf) on the
586 interface's transmit path.
587 Packet rate, data rate in bytes per interval, drop rate, and queue
588 length is displayed in three separate sections in a convenient
589 INTERFACE-by-ALTQLABEL matrix.
592 and queue length are combined in the third section.
593 If packet drops are present, drops
594 will be displayed, otherwise the packet queue length with a
596 suffix will be displayed.
599 Commands to switch between displays may be abbreviated to the
600 minimum unambiguous prefix; for example, ``io'' for ``iostat''.
601 Certain information may be discarded when the screen size is
602 insufficient for display.
603 For example, on a machine with 10 drives the
605 bar graph displays only 3 drives on a 24 line terminal.
606 When a bar graph would overflow the allotted screen space it is
607 truncated and the actual value is printed ``over top'' of the bar.
609 The following commands are common to each display which shows
610 information about disk drives.
611 These commands are used to
612 select a set of drives to report on, should your system have
613 more drives configured than can normally be displayed on the screen.
615 .Bl -tag -width Ar -compact
616 .It Ic ignore Op Ar drives
617 Do not display information about the drives indicated.
618 Multiple drives may be specified, separated by spaces.
627 This is to save space for other devices which are usually more interesting.
628 .It Ic display Op Ar drives
629 Display information about the drives indicated.
630 Multiple drives may be specified, separated by spaces.
631 .It Ic only Op Ar drives
632 Display only the specified drives.
633 Multiple drives may be specified, separated by spaces.
635 Display a list of available devices.
636 .It Ic match Ar type , Ns Ar if , Ns Ar pass Op | Ar ...
637 Display devices matching the given pattern.
638 The basic matching expressions are the same as those used in
641 Instead of specifying multiple
643 arguments which are then ORed together, the user instead specifies multiple
644 matching expressions joined by the pipe
647 The comma separated arguments within each matching expression are ANDed
648 together, and then the pipe separated matching expressions are ORed together.
649 Any device matching the combined expression will be displayed,
650 if there is room to display it.
653 .Dl match da,scsi | cd,ide
655 This will display all
657 Direct Access devices and all
661 .Dl match da | sa | cd,pass
663 This will display all Direct Access devices, all Sequential Access devices,
664 and all passthrough devices that provide access to
669 .Bl -tag -width ".Pa /boot/kernel/kernel" -compact
670 .It Pa /boot/kernel/kernel
673 For information in main memory
712 the notion of having different display modes for the
718 statistics was stolen from the
726 Certain displays presume a minimum of 80 characters per line.
729 display looks out of place because it is (it was added in as
730 a separate display rather than created as a new program).