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
42 .Op Ar refresh-interval
46 utility displays various system statistics in a screen oriented fashion
47 using the curses screen display library,
52 is running the screen is usually divided into two windows (an exception
57 displays which uses the entire screen).
58 The upper window depicts the current system load average.
59 The information displayed in the lower window may vary, depending on
61 The last line on the screen is reserved for user input and error messages.
65 displays the processes getting the largest percentage of the processor
67 Other displays show swap space usage, disk
71 virtual memory statistics (a la
73 network ``mbuf'' utilization,
76 and network connections (a la
79 Input is interpreted at two different levels.
80 A ``global'' command interpreter processes all keyboard input.
81 If this command interpreter fails to recognize a command, the
82 input line is passed to a per-display command interpreter.
83 This allows each display to have certain display-specific commands.
86 .Bl -tag -width "refresh_interval"
88 Wide mode output if available.
115 These displays can also be requested interactively (without the
119 .It Ar refresh-interval
122 specifies the screen refresh time interval in seconds.
123 Default is 5 seconds.
126 Certain characters cause immediate action by
133 Print the name of the current ``display'' being shown in
134 the lower window and the refresh interval.
136 Move the cursor to the command line and interpret the input
137 line typed as a command.
138 While entering a command the current character erase, word erase,
139 and line kill characters may be used.
142 The following commands are interpreted by the ``global'' command interpreter.
145 Print the names of the available displays on the command line.
147 Print the load average over the past 1, 5, and 15 minutes on the command line.
149 Stop refreshing the screen.
150 .It Oo Ic start Oc Op Ar number
151 Start (continue) refreshing the screen.
152 If a second, numeric, argument is provided it is interpreted as a
153 refresh interval (in seconds).
154 Supplying only a number will set the refresh interval to this value.
158 (This may be abbreviated to
162 The available displays are:
165 Display, in the lower window, those processes resident in main
166 memory and getting the
167 largest portion of the processor (the default display).
168 When less than 100% of the
169 processor is scheduled to user processes, the remaining time
170 is accounted to the ``idle'' process.
172 Display, in the lower window, statistics about messages received and
173 transmitted by the Internet Control Message Protocol
175 The left half of the screen displays information about received packets,
176 and the right half displays information regarding transmitted packets.
180 display understands two commands:
186 command is used to select one of four display modes, given as its argument:
188 .Bl -tag -width absoluteXX -compact
190 Show the rate of change of each value in packets per second (the default).
192 Show the rate of change of each value in packets per refresh interval.
194 Show the total change of each value since the display was last reset.
196 Show the absolute value of each statistic.
201 command resets the baseline for
206 command with no argument will display the current mode in the command line.
208 This display is like the
210 display, but displays statistics for
213 Otherwise identical to the
215 display, except that it displays
224 except that it displays
234 Display, in the lower window, statistics about network throughput on
235 a per-interface basis.
237 Display, in the lower window, statistics about processor use
239 Statistics on processor use appear as
240 bar graphs of the amount of time executing in user mode (`user'),
241 in user mode running low priority processes (`nice'), in
242 system mode (`system'), in interrupt mode (`interrupt'),
244 Statistics on disk throughput show, for each drive, megabytes per second,
245 average number of disk transactions per second, and
246 average kilobytes of data per transaction.
247 This information may be
248 displayed as bar graphs or as rows of numbers which scroll downward.
249 Bar graphs are shown by default.
251 The following commands are specific to the
253 display; the minimum unambiguous prefix may be supplied.
255 .Bl -tag -width Fl -compact
259 statistics in numeric form.
260 Values are displayed in numeric columns which scroll downward.
264 statistics in bar graph form (default).
266 Toggle the display of kilobytes per transaction.
267 (the default is to not display kilobytes per transaction).
270 Display, in the lower window,
271 the current values of available hardware sensors,
272 in a format similar to that of
275 The following commands are specific to the
277 display; the minimum unambiguous prefix may be supplied.
279 .Bl -tag -width Fl -compact
280 .It Ic type Op Ar type ...
281 Display only the sensors which match the specified
283 Multiple types may be specified,
285 If no types are specified,
286 all available sensors will be displayed.
307 .It Ic match Op Ar device ...
308 Display only the sensors match the specified
310 Multiple devices may be specified,
312 If no devices are specified,
313 all available sensors will be displayed.
314 A device type could be specified by using
317 in the place of the device unit.
323 Show information about swap space usage on all the
324 swap areas compiled into the kernel.
325 The first column is the device name of the partition.
326 The next column is the total space available in the partition.
327 The `Used' column indicates the total blocks used so far;
328 the graph shows the percentage of space in use on each partition.
329 If there are more than one swap partition in use,
330 a total line is also shown.
331 Areas known to the kernel, but not in use are shown as not available.
333 Display, in the lower window, the number of mbufs allocated
334 for particular uses, i.e.\& data, socket structures, etc.
336 Take over the entire display and show a (rather crowded) compendium
337 of statistics related to virtual memory usage, process scheduling,
338 device interrupts, system name translation cacheing, disk
342 The upper left quadrant of the screen shows the number
343 of users logged in and the load average over the last one, five,
344 and fifteen minute intervals.
346 Below this line are statistics on memory utilization.
347 The first row (`Active') reports memory usage in bytes
348 only among active processes,
349 that is processes that have run in the previous twenty seconds.
350 The second row (`Kernel') reports memory usage in bytes by the kernel.
351 The third row (`Free .. i+c+f') shows freeable memory in bytes,
352 which is inactive + cache + free.
353 I.e.\& Free i+c+f includes inactive pages, which aren't quite free,
354 but they will be made free given enough memory pressure.
355 Finally the last row (`Total') shows total system memory in bytes.
356 The second column reports on memory usage of all processes.
357 The first row (`VM-rss') shows bytes for total RSS.
358 This is basically how many pages the system is mapping to user processes.
359 Due to sharing this can be a large value.
360 The second row (`VM-swp') reports on swap, first swap used in bytes,
361 then, after `/', total swap in bytes.
363 Below the memory display is a list of the
364 average number of processes (over the last refresh interval)
365 that are runnable (`r'), in page wait (`p'),
366 in disk wait other than paging (`d'),
367 sleeping (`s'), and swapped out but desiring to run (`w').
368 The row also shows the average number of context switches (`Csw'),
369 traps (`Trp'; includes page faults), system calls (`Sys'), interrupts (`Int'),
370 network software interrupts (`Sof'), and page faults (`Flt').
372 Below the process queue length listing is a listing of
374 usage, a numerical listing and a bar graph showing the amount of
375 system (`='), interrupt (`+'), user (`>'), nice (`-'), and idle time (` ').
379 usage display are statistics on name translations and execs.
380 It lists the number of path names translated
381 in the previous interval (`Path-lookups'),
382 the number and percentage of the path lookups that were
383 handled by the name translation cache,
384 the average number of path components in path lookups (`Components') and,
387 per second (`Execs').
389 At the bottom left is the disk usage display.
390 It reports the number of
391 kilobytes per transaction (`KB/t'),
392 read transactions per second (`tpr/s'),
393 megabytes per second in read transaction (`MBr/s'),
394 write transactions per second (`tpw/s'),
395 megabytes per second in write transaction (`MBw/s') and
396 the percentage of the time the disk was busy (`% busy') averaged
397 over the refresh period of the display (by default, five seconds).
398 The system keeps statistics on most every storage device.
399 In general, up to seven devices are displayed.
400 The devices displayed by default are the
401 first devices in the kernel's device list.
402 Some devices are not shown by default, see
409 for details on the devstat system.
411 If at most 4 disk devices are shown,
412 extended virtual memory statistics are shown right to disk usage:
413 pages non-optimized zero filled on demand (`nzfod'),
414 pages optimized zero filled on demand (`ozfod'),
415 slow (i.e.\& non-optimized) zero fills percentage (`%sloz'),
416 total pages freed (`tfree').
418 Under the date in the upper right hand quadrant are statistics
419 on paging and swapping activity.
420 The first two columns (`VN PAGER') report the average number of bytes
421 brought in and out per second over the last refresh interval
422 due to page faults and the paging daemon.
423 The third and fourth columns (`SWAP PAGER') report the average number of bytes
424 brought in and out per second over the last refresh interval
425 due to swap requests initiated by the scheduler.
426 The first row (`bytes') of the display shows the average
427 number of bytes transferred per second over the last refresh interval;
428 the second row (`count') of the display shows the average
429 number of disk transfers per second over the last refresh interval;
430 this usually matches number of pages transferred
431 per second over the last refresh interval.
433 Below the paging statistics is a column of lines regarding the virtual
434 memory system which list the average number of
435 bytes in pages zero filled on demand (`zfod')
436 (shown with extended virtual memory statistics if screen space permits),
437 bytes in pages copied on write (`cow'),
438 bytes in pages wired down (`wire'),
439 bytes in active pages (`act'),
440 bytes in inactive pages (`inact'),
441 bytes in pages on the buffer cache queue (`cache'),
442 bytes in free pages (`free'),
443 pages freed by the page daemon (`daefr'),
444 pages freed by exiting processes (`prcfr'),
445 pages reactivated from the free list (`react'),
446 times the page daemon was awakened (`pdwak'),
447 pages analyzed by the page daemon (`pdpgs'),
449 intransit blocking page faults (`intrn')
450 per second over the refresh interval.
452 At the bottom of this column are lines showing the
453 amount of memory, in bytes, used for the buffer cache (`buf'),
454 number of dirty buffers in the buffer cache (`dirtybuf'),
455 number of active vnodes (`activ-vp'),
456 number of cached vnodes (`cachd-vp'),
458 number of inactive vnodes (`inact-vp').
460 Running down the right hand side of the display is a breakdown
461 of the interrupts being handled by the system (`Interrupts').
462 At the top of the list is the total interrupts per second
463 over the time interval (`total').
464 The rest of the column breaks down the total on a device by device basis.
465 Only devices that have interrupted at least once since boot time are shown.
467 The following commands are specific to the
469 display; the minimum unambiguous prefix may be supplied.
471 .Bl -tag -width Ar -compact
473 Display cumulative statistics since the system was booted.
475 Display statistics as a running total from the point this command is given.
477 Display statistics averaged over the refresh interval (the default).
479 Reset running statistics to zero.
482 Display total and per
484 statistics, including
486 timer interrupts (`timer'),
488 (Inter-Processor Interrupts) (`ipi'),
489 external interrupts (i.e.\& not timer or ipi) (`extint'),
491 time breakdown (`user%', `sys%', `intr%', and `idle%'),
493 collisions (`smpcol'), and name of last colliding item (`label').
501 Display, in the lower window, network connections.
502 By default, network servers awaiting requests are not displayed.
503 Each address is displayed in the format ``host.port'',
504 with each shown symbolically, when possible.
505 It is possible to have addresses displayed numerically,
506 limit the display to a set of ports, hosts, and/or protocols
507 (the minimum unambiguous prefix may be supplied):
509 .Bl -tag -width Ar -compact
511 Toggle the displaying of server processes awaiting requests (this
512 is the equivalent of the
517 Display network addresses numerically.
519 Display network addresses symbolically.
520 .It Ic proto Ar protocol
521 Display only network connections using the indicated
523 Supported protocols are
528 .It Ic ignore Op Ar items
529 Do not display information about connections associated with
530 the specified hosts or ports.
531 Hosts and ports may be specified
532 by name (``vangogh'', ``ftp''), or numerically.
533 Host addresses use the Internet dot notation (``128.32.0.9'').
535 may be specified with a single command by separating them with spaces.
536 .It Ic display Op Ar items
537 Display information about the connections associated with the
538 specified hosts or ports.
542 may be names or numbers.
543 .It Ic show Op Cm ports | protos | hosts
544 Show, on the command line, the currently selected protocols, hosts, and ports.
545 Hosts and ports which are being ignored are prefixed with a `!'.
550 is supplied as an argument to
552 then only the requested information will be displayed.
554 Reset the port, host, and protocol matching mechanisms to the default
555 (any protocol, port, or host).
558 Display aggregate and per-connection TCP receive and transmit rates.
559 Only active TCP connections originated or terminated by the host
562 Display packet filter
564 state information for states which are
565 actively passing data.
568 to be active to be meaningful
569 but is capable of displaying connection state for all packet traffic
570 passing through the machine, even for connections that do not originate
571 or terminate on the machine.
573 You need a wide ~100 column window to display
576 IPV6 addresses are truncated (just the first two and last two words
577 are displayed) for brevity.
578 Generally speaking `rcv' is data received
579 by the first IP address and `snd' is data sent to the second IP address.
581 the total sum of data sent plus received tracked by the state.
583 The display is sorted by average rx+tx bandwidth calculated on a 1/8 decay
584 curve to prevent fields from jumping around too much.
586 are selected based on the largest bandwidth measurement for uniformity.
587 Note that two states will be present for any connection operating over NAT.
588 Needs root privilege.
590 Display packet filter altq statistics.
591 The ALTQ operates in conjunction with the packet filter (pf) on the
592 interface's transmit path.
593 Packet rate, data rate in bytes per interval, drop rate, and queue
594 length is displayed in three separate sections in a convenient
595 INTERFACE-by-ALTQLABEL matrix.
598 and queue length are combined in the third section.
599 If packet drops are present, drops
600 will be displayed, otherwise the packet queue length with a
602 suffix will be displayed.
605 Commands to switch between displays may be abbreviated to the
606 minimum unambiguous prefix; for example, ``io'' for ``iostat''.
607 Certain information may be discarded when the screen size is
608 insufficient for display.
609 For example, on a machine with 10 drives the
611 bar graph displays only 3 drives on a 24 line terminal.
612 When a bar graph would overflow the allotted screen space it is
613 truncated and the actual value is printed ``over top'' of the bar.
615 The following commands are common to each display which shows
616 information about disk drives.
617 These commands are used to
618 select a set of drives to report on, should your system have
619 more drives configured than can normally be displayed on the screen.
621 .Bl -tag -width Ar -compact
622 .It Ic ignore Op Ar drives
623 Do not display information about the drives indicated.
624 Multiple drives may be specified, separated by spaces.
633 This is to save space for other devices which are usually more interesting.
634 .It Ic display Op Ar drives
635 Display information about the drives indicated.
636 Multiple drives may be specified, separated by spaces.
637 .It Ic only Op Ar drives
638 Display only the specified drives.
639 Multiple drives may be specified, separated by spaces.
641 Display a list of available devices.
642 .It Ic match Ar type , Ns Ar if , Ns Ar pass Op | Ar ...
643 Display devices matching the given pattern.
644 The basic matching expressions are the same as those used in
647 Instead of specifying multiple
649 arguments which are then ORed together, the user instead specifies multiple
650 matching expressions joined by the pipe
653 The comma separated arguments within each matching expression are ANDed
654 together, and then the pipe separated matching expressions are ORed together.
655 Any device matching the combined expression will be displayed,
656 if there is room to display it.
659 .Dl match da,scsi | cd,ide
661 This will display all
663 Direct Access devices and all
667 .Dl match da | sa | cd,pass
669 This will display all Direct Access devices, all Sequential Access devices,
670 and all passthrough devices that provide access to
675 .Bl -tag -width ".Pa /boot/kernel/kernel" -compact
676 .It Pa /boot/kernel/kernel
679 For information in main memory
718 the notion of having different display modes for the
724 statistics was stolen from the
732 Certain displays presume a minimum of 80 characters per line.
735 display looks out of place because it is (it was added in as
736 a separate display rather than created as a new program).