kernel - close holes in autoconf's run_interrupt_driven_config_hooks()
[dragonfly.git] / usr.bin / systat / systat.1
blobbb0e2d207638281bd74d5951539e5f5a769dfde2
1 .\" Copyright (c) 1985, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)systat.1    8.2 (Berkeley) 12/30/93
33 .\" $FreeBSD: src/usr.bin/systat/systat.1,v 1.23.2.9 2002/12/29 16:35:40 schweikh Exp $
34 .\" $DragonFly: src/usr.bin/systat/systat.1,v 1.8 2008/09/02 11:50:46 matthias Exp $
35 .\"
36 .Dd September 28, 2009
37 .Dt SYSTAT 1
38 .Os
39 .Sh NAME
40 .Nm systat
41 .Nd display system statistics on a crt
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl Ar display
45 .Op Ar refresh-interval
46 .Sh DESCRIPTION
47 The
48 .Nm
49 utility displays various system statistics in a screen oriented fashion
50 using the curses screen display library,
51 .Xr ncurses 3 .
52 .Pp
53 While
54 .Nm
55 is running the screen is usually divided into two windows (an exception
56 is the vmstat display which uses the entire screen).
57 The upper window depicts the current system load average.
58 The information displayed in the lower window may vary, depending on
59 user commands.
60 The last line on the screen is reserved for user input and error messages.
61 .Pp
62 By default
63 .Nm
64 displays the processes getting the largest percentage of the processor
65 in the lower window.
66 Other displays show swap space usage, disk
67 .Tn I/O
68 statistics (a la
69 .Xr iostat 8 ) ,
70 virtual memory statistics (a la
71 .Xr vmstat 8 ) ,
72 network ``mbuf'' utilization,
73 .Tn TCP/IP
74 statistics,
75 and network connections (a la
76 .Xr netstat 1 ) .
77 .Pp
78 Input is interpreted at two different levels.
79 A ``global'' command interpreter processes all keyboard input.
80 If this command interpreter fails to recognize a command, the
81 input line is passed to a per-display command interpreter.
82 This allows each display to have certain display-specific commands.
83 .Pp
84 Command line options:
85 .Bl -tag -width "refresh_interval"
86 .It Fl Ns Ar display
87 The
88 .Fl
89 flag expects
90 .Ar display
91 to be one of:
92 .Ic icmp ,
93 .Ic icmp6 ,
94 .Ic ifstat ,
95 .Ic iostat ,
96 .Ic ip ,
97 .Ic ip6 ,
98 .Ic mbufs ,
99 .Ic netstat ,
100 .Ic pigs ,
101 .Ic pvmmeter ,
102 .Ic sensors ,
103 .Ic swap ,
104 .Ic tcp ,
106 .Ic vmstat .
107 These displays can also be requested interactively (without the
108 .Dq Fl )
109 and are described in
110 full detail below.
111 .It Ar refresh-interval
113 .Ar refresh-value
114 specifies the screen refresh time interval in seconds.
117 Certain characters cause immediate action by
118 .Nm .
119 These are
120 .Bl -tag -width Fl
121 .It Ic \&^L
122 Refresh the screen.
123 .It Ic \&^G
124 Print the name of the current ``display'' being shown in
125 the lower window and the refresh interval.
126 .It Ic \&:
127 Move the cursor to the command line and interpret the input
128 line typed as a command.
129 While entering a command the current character erase, word erase,
130 and line kill characters may be used.
133 The following commands are interpreted by the ``global'' 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 on the command line.
139 .It Ic stop
140 Stop refreshing the screen.
141 .It Xo
142 .Op Ic start
143 .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.
149 .It Ic quit
150 Exit
151 .Nm .
152 (This may be abbreviated to
153 .Ic q  . )
156 The available displays are:
157 .Bl -tag -width Ic
158 .It Ic pigs
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.
165 .It Ic icmp
166 Display, in the lower window, statistics about messages received and
167 transmitted by the Internet Control Message Protocol
168 .Pq Dq Tn ICMP .
169 The left half of the screen displays information about received packets,
170 and the right half displays information regarding transmitted packets.
173 .Ic icmp
174 display understands two commands:
175 .Ic mode
177 .Ic reset .
179 .Ic mode
180 command is used to select one of four display modes, given as its argument:
181 .Bl -tag -width absoluteXX -compact
182 .It Ic rate
183 Show the rate of change of each value in packets per second (the default).
184 .It Ic delta
185 Show the rate of change of each value in packets per refresh interval.
186 .It Ic since
187 Show the total change of each value since the display was last reset.
188 .It Ic absolute
189 Show the absolute value of each statistic.
193 .Ic reset
194 command resets the baseline for
195 .Ic since
196 mode.
198 .Ic mode
199 command with no argument will display the current mode in the command line.
200 .It Ic icmp6
201 This display is like the
202 .Ic icmp
203 display, but displays statistics for IPv6 ICMP.
204 .It Ic ip
205 Otherwise identical to the
206 .Ic icmp
207 display, except that it displays
208 .Tn IP
210 .Tn UDP
211 statistics.
212 .It Ic ip6
213 Like the
214 .Ic ip
215 display,
216 except that it displays
217 .Tn IPv6
218 statistics.
219 .It Ic tcp
220 Like
221 .Ic icmp ,
222 but with
223 .Tn TCP
224 statistics.
225 .It Ic ifstat
226 Display, in the lower window, statistics about network throughput on
227 a per-interface basis.
228 .It Ic iostat
229 Display, in the lower window, statistics about processor use
230 and disk throughput.
231 Statistics on processor use appear as
232 bar graphs of the amount of time executing in user mode (``user''),
233 in user mode running low priority processes (``nice''), in
234 system mode (``system''), in interrupt mode (``interrupt''),
235 and idle (``idle'').
236 Statistics on disk throughput show, for each drive, megabytes per second,
237 average number of disk transactions per second, and
238 average kilobytes of data per transaction.
239 This information may be
240 displayed as bar graphs or as rows of numbers which scroll downward.
241 Bar graphs are shown by default.
243 The following commands are specific to the
244 .Ic iostat
245 display; the minimum unambiguous prefix may be supplied.
247 .Bl -tag -width Fl -compact
248 .It Ic numbers
249 Show the disk
250 .Tn I/O
251 statistics in numeric form.
252 Values are displayed in numeric columns which scroll downward.
253 .It Ic bars
254 Show the disk
255 .Tn I/O
256 statistics in bar graph form (default).
257 .It Ic kbpt
258 Toggle the display of kilobytes per transaction.
259 (the default is to not display kilobytes per transaction).
261 .It Ic sensors
262 Display, in the lower window,
263 the current values of available hardware sensors,
264 in a format similar to that of
265 .Xr sysctl 8 .
266 .It Ic swap
267 Show information about swap space usage on all the
268 swap areas compiled into the kernel.
269 The first column is the device name of the partition.
270 The next column is the total space available in the partition.
271 The ``Used'' column indicates the total blocks used so far;
272 the graph shows the percentage of space in use on each partition.
273 If there are more than one swap partition in use,
274 a total line is also shown.
275 Areas known to the kernel, but not in use are shown as not available.
276 .It Ic mbufs
277 Display, in the lower window, the number of mbufs allocated
278 for particular uses, i.e.\& data, socket structures, etc.
279 .It Ic vmstat
280 Take over the entire display and show a (rather crowded) compendium
281 of statistics related to virtual memory usage, process scheduling,
282 device interrupts, system name translation cacheing, disk
283 .Tn I/O
284 etc.
286 The upper left quadrant of the screen shows the number
287 of users logged in and the load average over the last one, five,
288 and fifteen minute intervals.
289 Below this line are statistics on memory utilization.
290 The first row of the table reports memory usage only among active processes,
291 that is processes that have run in the previous twenty seconds.
292 The second row reports on memory usage of all processes.
293 The first column reports on the number of physical pages claimed by processes.
294 The second column reports the number of physical pages that
295 are devoted to read only text pages.
296 The third and fourth columns report the same two figures for
297 virtual pages, that is the number of pages that would be
298 needed if all processes had all of their pages.
299 Finally the last column shows the number of physical pages on the free list.
301 Below the memory display is a list of the
302 average number of processes (over the last refresh interval)
303 that are runnable (`r'), in page wait (`p'),
304 in disk wait other than paging (`d'),
305 sleeping (`s'), and swapped out but desiring to run (`w').
306 The row also shows the average number of context switches (`Csw'),
307 traps (`Trp'; includes page faults), system calls (`Sys'), interrupts (`Int'),
308 network software interrupts (`Sof'), and page faults (`Flt').
310 Below the process queue length listing is a numerical listing and
311 a bar graph showing the amount of
312 system (shown as `='), interrupt (shown as `+'), user (shown as `>'),
313 nice (shown as `-'), and idle time (shown as ` ').
315 Below the process display are statistics on name translations.
316 It lists the number of names translated in the previous interval,
317 the number and percentage of the translations that were
318 handled by the system wide name translation cache, and
319 the number and percentage of the translations that were
320 handled by the per process name translation cache.
322 At the bottom left is the disk usage display.
323 It reports the number of
324 kilobytes per transaction, transactions per second, megabytes
325 per second and the percentage of the time the disk was busy averaged
326 over the refresh period of the display (by default, five seconds).
327 The system keeps statistics on most every storage device.
328 In general, up to seven devices are displayed.
329 The devices displayed by default are the
330 first devices in the kernel's device list.
332 .Xr devstat 3
334 .Xr devstat 9
335 for details on the devstat system.
337 Under the date in the upper right hand quadrant are statistics
338 on paging and swapping activity.
339 The first two columns report the average number of pages
340 brought in and out per second over the last refresh interval
341 due to page faults and the paging daemon.
342 The third and fourth columns report the average number of pages
343 brought in and out per second over the last refresh interval
344 due to swap requests initiated by the scheduler.
345 The first row of the display shows the average
346 number of disk transfers per second over the last refresh interval;
347 the second row of the display shows the average
348 number of pages transferred per second over the last refresh interval.
350 Below the paging statistics is a column of lines regarding the virtual
351 memory system which list the average number of
352 pages copied on write (`cow'),
353 pages zero filled on demand (`zfod'),
354 slow (on-the-fly) zero fills percentage (`%slo-z'),
355 pages wired down (`wire'),
356 active pages (`act'),
357 inactive pages (`inact'),
358 pages on the buffer cache queue (`cache'),
359 number of free pages (`free'),
360 pages freed by the page daemon (`daefr'),
361 pages freed by exiting processes (`prcfr'),
362 pages reactivated from the free list (`react'),
363 times the page daemon was awakened (`pdwak'),
364 pages analyzed by the page daemon (`pdpgs'),
366 intransit blocking page faults (`intrn')
367 per second over the refresh interval.
369 At the bottom of this column are lines showing the
370 amount of memory, in kilobytes, used for the buffer cache (`buf'),
371 the number of dirty buffers in the buffer cache (`dirtybuf'),
372 desired maximum size of vnode cache (`desiredvnodes')
373 (mostly unused, except to size the name cache),
374 number of vnodes actually allocated (`numvnodes'),
376 number of allocated vnodes that are free (`freevnodes').
378 Running down the right hand side of the display is a breakdown
379 of the interrupts being handled by the system.
380 At the top of the list is the total interrupts per second
381 over the time interval.
382 The rest of the column breaks down the total on a device by device basis.
383 Only devices that have interrupted at least once since boot time are shown.
385 The following commands are specific to the
386 .Ic vmstat
387 display; the minimum unambiguous prefix may be supplied.
389 .Bl -tag -width Ar -compact
390 .It Ic boot
391 Display cumulative statistics since the system was booted.
392 .It Ic run
393 Display statistics as a running total from the point this command is given.
394 .It Ic time
395 Display statistics averaged over the refresh interval (the default).
396 .It Ic want_fd
397 Toggle the display of fd devices in the disk usage display.
398 .It Ic zero
399 Reset running statistics to zero.
401 .It Ic pvmmeter
402 Display per-CPU statistics, including LAPIC timer interrupts,
403 IPI interrupts, CPU times (sys, user, idle), niceness, and
404 interrupt rate in percent.
405 .It Ic netstat
406 Display, in the lower window, network connections.
407 By default, network servers awaiting requests are not displayed.
408 Each address is displayed in the format ``host.port'',
409 with each shown symbolically, when possible.
410 It is possible to have addresses displayed numerically,
411 limit the display to a set of ports, hosts, and/or protocols
412 (the minimum unambiguous prefix may be supplied):
414 .Bl -tag -width Ar -compact
415 .It Ic all
416 Toggle the displaying of server processes awaiting requests (this
417 is the equivalent of the
418 .Fl a
419 flag to
420 .Xr netstat 1 ) .
421 .It Ic numbers
422 Display network addresses numerically.
423 .It Ic names
424 Display network addresses symbolically.
425 .It Ic proto Ar protocol
426 Display only network connections using the indicated
427 .Ar protocol .
428 Supported protocols are
429 .Cm tcp ,
430 .Cm udp ,
432 .Cm all .
433 .It Ic ignore Op Ar items
434 Do not display information about connections associated with
435 the specified hosts or ports.
436 Hosts and ports may be specified
437 by name (``vangogh'', ``ftp''), or numerically.
438 Host addresses use the Internet dot notation (``128.32.0.9'').
439 Multiple items
440 may be specified with a single command by separating them with spaces.
441 .It Ic display Op Ar items
442 Display information about the connections associated with the
443 specified hosts or ports.
444 As for
445 .Ic ignore ,
446 .Ar items
447 may be names or numbers.
448 .It Ic show Op Cm ports | hosts
449 Show, on the command line, the currently selected protocols, hosts, and ports.
450 Hosts and ports which are being ignored are prefixed with a `!'.
452 .Cm ports
454 .Cm hosts
455 is supplied as an argument to
456 .Ic show ,
457 then only the requested information will be displayed.
458 .It Ic reset
459 Reset the port, host, and protocol matching mechanisms to the default
460 (any protocol, port, or host).
464 Commands to switch between displays may be abbreviated to the
465 minimum unambiguous prefix; for example, ``io'' for ``iostat''.
466 Certain information may be discarded when the screen size is
467 insufficient for display.
468 For example, on a machine with 10 drives the
469 .Ic iostat
470 bar graph displays only 3 drives on a 24 line terminal.
471 When a bar graph would overflow the allotted screen space it is
472 truncated and the actual value is printed ``over top'' of the bar.
474 The following commands are common to each display which shows
475 information about disk drives.
476 These commands are used to
477 select a set of drives to report on, should your system have
478 more drives configured than can normally be displayed on the screen.
480 .Bl -tag -width Ar -compact
481 .It Ic ignore Op Ar drives
482 Do not display information about the drives indicated.
483 Multiple drives may be specified, separated by spaces.
484 .It Ic display Op Ar drives
485 Display information about the drives indicated.
486 Multiple drives may be specified, separated by spaces.
487 .It Ic only Op Ar drives
488 Display only the specified drives.
489 Multiple drives may be specified, separated by spaces.
490 .It Ic drives
491 Display a list of available devices.
492 .It Ic match Xo
493 .Ar type , Ns Ar if , Ns Ar pass
494 .Op | Ar ...
496 Display devices matching the given pattern.
497 The basic matching expressions are the same as those used in
498 .Xr iostat 8
499 with one difference.
500 Instead of specifying multiple
501 .Fl t
502 arguments which are then ORed together, the user instead specifies multiple
503 matching expressions joined by the pipe
504 .Pq Ql \&|
505 character.
506 The comma separated arguments within each matching expression are ANDed
507 together, and then the pipe separated matching expressions are ORed together.
508 Any device matching the combined expression will be displayed,
509 if there is room to display it.
510 For example:
512 .Dl match da,scsi | cd,ide
514 This will display all SCSI Direct Access devices and all IDE CDROM devices.
516 .Dl match da | sa | cd,pass
518 This will display all Direct Access devices, all Sequential Access devices,
519 and all passthrough devices that provide access to CDROM drives.
521 .Sh FILES
522 .Bl -tag -width /etc/networks -compact
523 .It Pa /boot/kernel
524 For the namelist.
525 .It Pa /dev/kmem
526 For information in main memory.
527 .It Pa /etc/hosts
528 For host names.
529 .It Pa /etc/networks
530 For network names.
531 .It Pa /etc/services
532 For port names.
534 .Sh SEE ALSO
535 .Xr netstat 1 ,
536 .Xr kvm 3 ,
537 .Xr icmp 4 ,
538 .Xr icmp6 4 ,
539 .Xr ip 4 ,
540 .Xr ip6 4 ,
541 .Xr tcp 4 ,
542 .Xr udp 4 ,
543 .Xr iostat 8 ,
544 .Xr sysctl 8 ,
545 .Xr vmstat 8
546 .Sh HISTORY
549 program appeared in
550 .Bx 4.3 .
552 .Ic icmp ,
553 .Ic ip ,
555 .Ic tcp
556 displays appeared in
557 .Fx 3.0 ;
558 the notion of having different display modes for the
559 .Tn ICMP ,
560 .Tn IP ,
561 .Tn TCP ,
563 .Tn UDP
564 statistics was stolen from the
565 .Fl C
566 option to
567 .Xr netstat 1
568 in Silicon Graphics'
569 .Tn IRIX
570 system.
571 .Sh BUGS
572 Certain displays presume a minimum of 80 characters per line.
574 .Ic vmstat
575 display looks out of place because it is (it was added in as
576 a separate display rather than created as a new program).