xref: /freebsd/usr.bin/systat/systat.1 (revision eaa9b5ef097106dbc8eb73c0e92e2ab47748ba44)
19b50d902SRodney W. Grimes.\" Copyright (c) 1985, 1990, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
129b50d902SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
139b50d902SRodney W. Grimes.\"    must display the following acknowledgement:
149b50d902SRodney W. Grimes.\"	This product includes software developed by the University of
159b50d902SRodney W. Grimes.\"	California, Berkeley and its contributors.
169b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
179b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
189b50d902SRodney W. Grimes.\"    without specific prior written permission.
199b50d902SRodney W. Grimes.\"
209b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
219b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
229b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
239b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
249b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
259b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
269b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
279b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
289b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
299b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
309b50d902SRodney W. Grimes.\" SUCH DAMAGE.
319b50d902SRodney W. Grimes.\"
329b50d902SRodney W. Grimes.\"	@(#)systat.1	8.2 (Berkeley) 12/30/93
33c3aac50fSPeter Wemm.\" $FreeBSD$
349b50d902SRodney W. Grimes.\"
35eaa9b5efSBrad Davis.Dd May 25, 2006
369b50d902SRodney W. Grimes.Dt SYSTAT 1
3762500372SRuslan Ermilov.Os
389b50d902SRodney W. Grimes.Sh NAME
399b50d902SRodney W. Grimes.Nm systat
40eaa9b5efSBrad Davis.Nd display system statistics
419b50d902SRodney W. Grimes.Sh SYNOPSIS
42d8793dfaSPhilippe Charnier.Nm
439b50d902SRodney W. Grimes.Op Fl display
449b50d902SRodney W. Grimes.Op Ar refresh-interval
459b50d902SRodney W. Grimes.Sh DESCRIPTION
46e8937ba0SPhilippe CharnierThe
47e8937ba0SPhilippe Charnier.Nm
48e8937ba0SPhilippe Charnierutility displays various system statistics in a screen oriented fashion
499b50d902SRodney W. Grimesusing the curses screen display library,
50436aece8SNik Clayton.Xr ncurses 3 .
519b50d902SRodney W. Grimes.Pp
529b50d902SRodney W. GrimesWhile
53d8793dfaSPhilippe Charnier.Nm
549b50d902SRodney W. Grimesis running the screen is usually divided into two windows (an exception
556a3e8b0aSRuslan Ermilovis the vmstat display which uses the entire screen).
566a3e8b0aSRuslan ErmilovThe
576a3e8b0aSRuslan Ermilovupper window depicts the current system load average.
586a3e8b0aSRuslan ErmilovThe
599b50d902SRodney W. Grimesinformation displayed in the lower window may vary, depending on
606a3e8b0aSRuslan Ermilovuser commands.
616a3e8b0aSRuslan ErmilovThe last line on the screen is reserved for user
629b50d902SRodney W. Grimesinput and error messages.
639b50d902SRodney W. Grimes.Pp
649b50d902SRodney W. GrimesBy default
65d8793dfaSPhilippe Charnier.Nm
669b50d902SRodney W. Grimesdisplays the processes getting the largest percentage of the processor
676a3e8b0aSRuslan Ermilovin the lower window.
686a3e8b0aSRuslan ErmilovOther displays show swap space usage, disk
699b50d902SRodney W. Grimes.Tn I/O
709b50d902SRodney W. Grimesstatistics (a la
71270d3d75SMike Pritchard.Xr iostat 8 ) ,
729b50d902SRodney W. Grimesvirtual memory statistics (a la
73270d3d75SMike Pritchard.Xr vmstat 8 ) ,
7403e00a72SGarrett Wollmannetwork ``mbuf'' utilization,
75630fa006SGarrett Wollman.Tn TCP/IP
7603e00a72SGarrett Wollmanstatistics,
7703e00a72SGarrett Wollmanand network connections (a la
789b50d902SRodney W. Grimes.Xr netstat 1 ) .
799b50d902SRodney W. Grimes.Pp
809b50d902SRodney W. GrimesInput is interpreted at two different levels.
819b50d902SRodney W. GrimesA ``global'' command interpreter processes all keyboard input.
829b50d902SRodney W. GrimesIf this command interpreter fails to recognize a command, the
836a3e8b0aSRuslan Ermilovinput line is passed to a per-display command interpreter.
846a3e8b0aSRuslan ErmilovThis
859b50d902SRodney W. Grimesallows each display to have certain display-specific commands.
869b50d902SRodney W. Grimes.Pp
879b50d902SRodney W. GrimesCommand line options:
889b50d902SRodney W. Grimes.Bl -tag -width "refresh_interval"
899b50d902SRodney W. Grimes.It Fl Ns Ar display
909b50d902SRodney W. GrimesThe
919b50d902SRodney W. Grimes.Fl
929b50d902SRodney W. Grimesflag expects
939b50d902SRodney W. Grimes.Ar display
949b50d902SRodney W. Grimesto be one of:
9503e00a72SGarrett Wollman.Ic icmp ,
96f29d8c1aSDavid Malone.Ic icmp6 ,
97b59ba7dfSPoul-Henning Kamp.Ic ifstat ,
989b50d902SRodney W. Grimes.Ic iostat ,
99630fa006SGarrett Wollman.Ic ip ,
100f29d8c1aSDavid Malone.Ic ip6 ,
1019b50d902SRodney W. Grimes.Ic mbufs ,
102630fa006SGarrett Wollman.Ic netstat ,
103630fa006SGarrett Wollman.Ic pigs ,
104630fa006SGarrett Wollman.Ic swap ,
105630fa006SGarrett Wollman.Ic tcp ,
1069b50d902SRodney W. Grimesor
107630fa006SGarrett Wollman.Ic vmstat .
1089b50d902SRodney W. GrimesThese displays can also be requested interactively (without the
1099b50d902SRodney W. Grimes.Dq Fl )
1109b50d902SRodney W. Grimesand are described in
1119b50d902SRodney W. Grimesfull detail below.
1129b50d902SRodney W. Grimes.It Ar refresh-interval
1139b50d902SRodney W. GrimesThe
1149b50d902SRodney W. Grimes.Ar refresh-value
1159b50d902SRodney W. Grimesspecifies the screen refresh time interval in seconds.
1169b50d902SRodney W. Grimes.El
1179b50d902SRodney W. Grimes.Pp
1189b50d902SRodney W. GrimesCertain characters cause immediate action by
1198fe908efSRuslan Ermilov.Nm .
1209b50d902SRodney W. GrimesThese are
1219b50d902SRodney W. Grimes.Bl -tag -width Fl
1229b50d902SRodney W. Grimes.It Ic \&^L
1239b50d902SRodney W. GrimesRefresh the screen.
1249b50d902SRodney W. Grimes.It Ic \&^G
1259b50d902SRodney W. GrimesPrint the name of the current ``display'' being shown in
1269b50d902SRodney W. Grimesthe lower window and the refresh interval.
1279b50d902SRodney W. Grimes.It Ic \&:
1289b50d902SRodney W. GrimesMove the cursor to the command line and interpret the input
1296a3e8b0aSRuslan Ermilovline typed as a command.
1306a3e8b0aSRuslan ErmilovWhile entering a command the
1319b50d902SRodney W. Grimescurrent character erase, word erase, and line kill characters
1329b50d902SRodney W. Grimesmay be used.
1339b50d902SRodney W. Grimes.El
1349b50d902SRodney W. Grimes.Pp
1359b50d902SRodney W. GrimesThe following commands are interpreted by the ``global''
1369b50d902SRodney W. Grimescommand interpreter.
1379b50d902SRodney W. Grimes.Bl -tag -width Fl
1389b50d902SRodney W. Grimes.It Ic help
1399b50d902SRodney W. GrimesPrint the names of the available displays on the command line.
1409b50d902SRodney W. Grimes.It Ic load
1419b50d902SRodney W. GrimesPrint the load average over the past 1, 5, and 15 minutes
1429b50d902SRodney W. Grimeson the command line.
1439b50d902SRodney W. Grimes.It Ic stop
1449b50d902SRodney W. GrimesStop refreshing the screen.
1459b50d902SRodney W. Grimes.It Xo
1469b50d902SRodney W. Grimes.Op Ic start
1479b50d902SRodney W. Grimes.Op Ar number
1489b50d902SRodney W. Grimes.Xc
1496a3e8b0aSRuslan ErmilovStart (continue) refreshing the screen.
1506a3e8b0aSRuslan ErmilovIf a second, numeric,
1519b50d902SRodney W. Grimesargument is provided it is interpreted as a refresh interval
1529b50d902SRodney W. Grimes(in seconds).
1539b50d902SRodney W. GrimesSupplying only a number will set the refresh interval to this
1549b50d902SRodney W. Grimesvalue.
1559b50d902SRodney W. Grimes.It Ic quit
1569b50d902SRodney W. GrimesExit
1578fe908efSRuslan Ermilov.Nm .
1589b50d902SRodney W. Grimes(This may be abbreviated to
1599b50d902SRodney W. Grimes.Ic q . )
1609b50d902SRodney W. Grimes.El
1619b50d902SRodney W. Grimes.Pp
1629b50d902SRodney W. GrimesThe available displays are:
1639b50d902SRodney W. Grimes.Bl -tag -width Ic
1649b50d902SRodney W. Grimes.It Ic pigs
1659b50d902SRodney W. GrimesDisplay, in the lower window, those processes resident in main
1669b50d902SRodney W. Grimesmemory and getting the
1679b50d902SRodney W. Grimeslargest portion of the processor (the default display).
1689b50d902SRodney W. GrimesWhen less than 100% of the
1699b50d902SRodney W. Grimesprocessor is scheduled to user processes, the remaining time
1709b50d902SRodney W. Grimesis accounted to the ``idle'' process.
17103e00a72SGarrett Wollman.It Ic icmp
17203e00a72SGarrett WollmanDisplay, in the lower window, statistics about messages received and
17303e00a72SGarrett Wollmantransmitted by the Internet Control Message Protocol
17403e00a72SGarrett Wollman.Pq Dq Tn ICMP .
17503e00a72SGarrett WollmanThe left half of the screen displays information about received
17603e00a72SGarrett Wollmanpackets, and the right half displays information regarding transmitted
17703e00a72SGarrett Wollmanpackets.
17803e00a72SGarrett Wollman.Pp
17903e00a72SGarrett WollmanThe
18003e00a72SGarrett Wollman.Ic icmp
18103e00a72SGarrett Wollmandisplay understands two commands:
18203e00a72SGarrett Wollman.Ic mode
18303e00a72SGarrett Wollmanand
18403e00a72SGarrett Wollman.Ic reset .
18503e00a72SGarrett WollmanThe
18603e00a72SGarrett Wollman.Ic mode
18703e00a72SGarrett Wollmancommand is used to select one of four display modes, given as its argument:
18803e00a72SGarrett Wollman.Bl -tag -width absoluteXX -compact
18903e00a72SGarrett Wollman.It Ic rate :
19003e00a72SGarrett Wollmanshow the rate of change of each value in packets (the default)
19103e00a72SGarrett Wollmanper second
19203e00a72SGarrett Wollman.It Ic delta :
19303e00a72SGarrett Wollmanshow the rate of change of each value in packets per refresh interval
19403e00a72SGarrett Wollman.It Ic since :
19503e00a72SGarrett Wollmanshow the total change of each value since the display was last reset
19603e00a72SGarrett Wollman.It Ic absolute :
19703e00a72SGarrett Wollmanshow the absolute value of each statistic
19803e00a72SGarrett Wollman.El
19903e00a72SGarrett Wollman.Pp
20003e00a72SGarrett WollmanThe
20103e00a72SGarrett Wollman.Ic reset
20203e00a72SGarrett Wollmancommand resets the baseline for
20303e00a72SGarrett Wollman.Ic since
2046a3e8b0aSRuslan Ermilovmode.
2056a3e8b0aSRuslan ErmilovThe
20603e00a72SGarrett Wollman.Ic mode
20703e00a72SGarrett Wollmancommand with no argument will display the current mode in the command
20803e00a72SGarrett Wollmanline.
209f29d8c1aSDavid Malone.It Ic icmp6
210f29d8c1aSDavid MaloneThis display is like the
211f29d8c1aSDavid Malone.Ic icmp
212f29d8c1aSDavid Malonedisplay,
213f29d8c1aSDavid Malonebut displays statistics for IPv6 ICMP.
214630fa006SGarrett Wollman.It Ic ip
215630fa006SGarrett WollmanOtherwise identical to the
216630fa006SGarrett Wollman.Ic icmp
217630fa006SGarrett Wollmandisplay, except that it displays
218630fa006SGarrett Wollman.Tn IP
219630fa006SGarrett Wollmanand
220630fa006SGarrett Wollman.Tn UDP
221630fa006SGarrett Wollmanstatistics.
222f29d8c1aSDavid Malone.It Ic ip6
223f29d8c1aSDavid MaloneLike the
224f29d8c1aSDavid Malone.Ic ip
225f29d8c1aSDavid Malonedisplay,
226f29d8c1aSDavid Maloneexcept that it displays
227f29d8c1aSDavid Malone.Tn IPv6
228f29d8c1aSDavid Malonestatics.
229f29d8c1aSDavid MaloneIt does not display
230f29d8c1aSDavid Malone.Tn UDP statistics.
231630fa006SGarrett Wollman.It Ic tcp
232630fa006SGarrett WollmanLike
233630fa006SGarrett Wollman.Ic icmp ,
234630fa006SGarrett Wollmanbut with
235630fa006SGarrett Wollman.Tn TCP
236630fa006SGarrett Wollmanstatistics.
2379b50d902SRodney W. Grimes.It Ic iostat
2389b50d902SRodney W. GrimesDisplay, in the lower window, statistics about processor use
2396a3e8b0aSRuslan Ermilovand disk throughput.
2406a3e8b0aSRuslan ErmilovStatistics on processor use appear as
2419b50d902SRodney W. Grimesbar graphs of the amount of time executing in user mode (``user''),
2429b50d902SRodney W. Grimesin user mode running low priority processes (``nice''), in
2433544ae54SBruce Evanssystem mode (``system''), in interrupt mode (``interrupt''),
2446a3e8b0aSRuslan Ermilovand idle (``idle'').
2456a3e8b0aSRuslan ErmilovStatistics
2468d2fbde5SJustin T. Gibbson disk throughput show, for each drive, megabytes per second,
2478d2fbde5SJustin T. Gibbsaverage number of disk transactions per second, and
2486a3e8b0aSRuslan Ermilovaverage kilobytes of data per transaction.
2496a3e8b0aSRuslan ErmilovThis information may be
2506a3e8b0aSRuslan Ermilovdisplayed as bar graphs or as rows of numbers which scroll downward.
2516a3e8b0aSRuslan ErmilovBar
252d8793dfaSPhilippe Charniergraphs are shown by default.
2539b50d902SRodney W. Grimes.Pp
2549b50d902SRodney W. GrimesThe following commands are specific to the
2559b50d902SRodney W. Grimes.Ic iostat
2569b50d902SRodney W. Grimesdisplay; the minimum unambiguous prefix may be supplied.
2579b50d902SRodney W. Grimes.Pp
2589b50d902SRodney W. Grimes.Bl -tag -width Fl -compact
2599b50d902SRodney W. Grimes.It Cm numbers
2609b50d902SRodney W. GrimesShow the disk
2619b50d902SRodney W. Grimes.Tn I/O
2626a3e8b0aSRuslan Ermilovstatistics in numeric form.
2636a3e8b0aSRuslan ErmilovValues are
2649b50d902SRodney W. Grimesdisplayed in numeric columns which scroll downward.
2659b50d902SRodney W. Grimes.It Cm bars
2669b50d902SRodney W. GrimesShow the disk
2679b50d902SRodney W. Grimes.Tn I/O
2689b50d902SRodney W. Grimesstatistics in bar graph form (default).
2698d2fbde5SJustin T. Gibbs.It Cm kbpt
2704e86fcacSSheldon HearnToggle the display of kilobytes per transaction.
2714e86fcacSSheldon Hearn(the default is to
2728d2fbde5SJustin T. Gibbsnot display kilobytes per transaction).
2739b50d902SRodney W. Grimes.El
2749b50d902SRodney W. Grimes.It Ic swap
2759b50d902SRodney W. GrimesShow information about swap space usage on all the
2769b50d902SRodney W. Grimesswap areas compiled into the kernel.
2779b50d902SRodney W. GrimesThe first column is the device name of the partition.
2789b50d902SRodney W. GrimesThe next column is the total space available in the partition.
2799b50d902SRodney W. GrimesThe
2809b50d902SRodney W. Grimes.Ar Used
2819b50d902SRodney W. Grimescolumn indicates the total blocks used so far;
2829b50d902SRodney W. Grimesthe graph shows the percentage of space in use on each partition.
2839b50d902SRodney W. GrimesIf there are more than one swap partition in use,
2849b50d902SRodney W. Grimesa total line is also shown.
2859b50d902SRodney W. GrimesAreas known to the kernel, but not in use are shown as not available.
2869b50d902SRodney W. Grimes.It Ic mbufs
2879b50d902SRodney W. GrimesDisplay, in the lower window, the number of mbufs allocated
2886a3e8b0aSRuslan Ermilovfor particular uses, i.e., data, socket structures, etc.
2899b50d902SRodney W. Grimes.It Ic vmstat
2909b50d902SRodney W. GrimesTake over the entire display and show a (rather crowded) compendium
2919b50d902SRodney W. Grimesof statistics related to virtual memory usage, process scheduling,
2926fb9b618SGiorgos Keramidasdevice interrupts, system name translation caching, disk
2939b50d902SRodney W. Grimes.Tn I/O
2949b50d902SRodney W. Grimesetc.
2959b50d902SRodney W. Grimes.Pp
2969b50d902SRodney W. GrimesThe upper left quadrant of the screen shows the number
2979b50d902SRodney W. Grimesof users logged in and the load average over the last one, five,
2989b50d902SRodney W. Grimesand fifteen minute intervals.
2999b50d902SRodney W. GrimesBelow this line are statistics on memory utilization.
3009b50d902SRodney W. GrimesThe first row of the table reports memory usage only among
3019b50d902SRodney W. Grimesactive processes, that is processes that have run in the previous
3029b50d902SRodney W. Grimestwenty seconds.
3039b50d902SRodney W. GrimesThe second row reports on memory usage of all processes.
3049b50d902SRodney W. GrimesThe first column reports on the number of physical pages
3059b50d902SRodney W. Grimesclaimed by processes.
3069b50d902SRodney W. GrimesThe second column reports the number of physical pages that
3079b50d902SRodney W. Grimesare devoted to read only text pages.
3089b50d902SRodney W. GrimesThe third and fourth columns report the same two figures for
3099b50d902SRodney W. Grimesvirtual pages, that is the number of pages that would be
3109b50d902SRodney W. Grimesneeded if all processes had all of their pages.
3119b50d902SRodney W. GrimesFinally the last column shows the number of physical pages
3129b50d902SRodney W. Grimeson the free list.
3139b50d902SRodney W. Grimes.Pp
314bdbbe98bSDavid E. O'BrienBelow the memory display is a list of the
3159b50d902SRodney W. Grimesaverage number of processes (over the last refresh interval)
3169b50d902SRodney W. Grimesthat are runnable (`r'), in page wait (`p'),
3179b50d902SRodney W. Grimesin disk wait other than paging (`d'),
3189b50d902SRodney W. Grimessleeping (`s'), and swapped out but desiring to run (`w').
319a57a22d2SGuy HelmerThe row also shows the average number of context switches
320a57a22d2SGuy Helmer(`Csw'), traps (`Trp'; includes page faults), system calls (`Sys'),
321a57a22d2SGuy Helmerinterrupts (`Int'), network software interrupts (`Sof'), and page
322a57a22d2SGuy Helmerfaults (`Flt').
323a57a22d2SGuy Helmer.Pp
324a57a22d2SGuy HelmerBelow the process queue length listing is a numerical listing and
3259b50d902SRodney W. Grimesa bar graph showing the amount of
3263544ae54SBruce Evanssystem (shown as `='), interrupt (shown as `+'), user (shown as `>'),
3279b50d902SRodney W. Grimesnice (shown as `-'), and idle time (shown as ` ').
3289b50d902SRodney W. Grimes.Pp
329bdbbe98bSDavid E. O'BrienBelow the process display are statistics on name translations.
3309b50d902SRodney W. GrimesIt lists the number of names translated in the previous interval,
3319b50d902SRodney W. Grimesthe number and percentage of the translations that were
3329b50d902SRodney W. Grimeshandled by the system wide name translation cache, and
3339b50d902SRodney W. Grimesthe number and percentage of the translations that were
3349b50d902SRodney W. Grimeshandled by the per process name translation cache.
3359b50d902SRodney W. Grimes.Pp
33671ae8101SBruce EvansTo the right of the name translations display are lines showing
33771ae8101SBruce Evansthe number of dirty buffers in the buffer cache (`dtbuf'),
33871ae8101SBruce Evansdesired maximum size of vnode cache (`desvn'),
33971ae8101SBruce Evansnumber of vnodes actually allocated (`numvn'),
34071ae8101SBruce Evansand
34171ae8101SBruce Evansnumber of allocated vnodes that are free (`frevn').
34271ae8101SBruce Evans.Pp
343bdbbe98bSDavid E. O'BrienAt the bottom left is the disk usage display.
344d6234488SDavid E. O'BrienIt reports the number of
345a4a026b4SDag-Erling Smørgravkilobytes per transaction, transactions per second, megabytes
346a4a026b4SDag-Erling Smørgravper second and the percentage of the time the disk was busy averaged
347a4a026b4SDag-Erling Smørgravover the refresh period of the display (by default, five seconds).
3486a3e8b0aSRuslan ErmilovThe system keeps statistics on most every storage device.
3496a3e8b0aSRuslan ErmilovIn general, up
3506a3e8b0aSRuslan Ermilovto seven devices are displayed.
3516a3e8b0aSRuslan ErmilovThe devices displayed by default are the
3526a3e8b0aSRuslan Ermilovfirst devices in the kernel's device list.
3536a3e8b0aSRuslan ErmilovSee
354d6234488SDavid E. O'Brien.Xr devstat 3
355d6234488SDavid E. O'Brienand
356d6234488SDavid E. O'Brien.Xr devstat 9
357d6234488SDavid E. O'Brienfor details on the devstat system.
358bdbbe98bSDavid E. O'Brien.Pp
3599b50d902SRodney W. GrimesUnder the date in the upper right hand quadrant are statistics
3609b50d902SRodney W. Grimeson paging and swapping activity.
3619b50d902SRodney W. GrimesThe first two columns report the average number of pages
3629b50d902SRodney W. Grimesbrought in and out per second over the last refresh interval
3639b50d902SRodney W. Grimesdue to page faults and the paging daemon.
3649b50d902SRodney W. GrimesThe third and fourth columns report the average number of pages
3659b50d902SRodney W. Grimesbrought in and out per second over the last refresh interval
3669b50d902SRodney W. Grimesdue to swap requests initiated by the scheduler.
3679b50d902SRodney W. GrimesThe first row of the display shows the average
3689b50d902SRodney W. Grimesnumber of disk transfers per second over the last refresh interval;
3699b50d902SRodney W. Grimesthe second row of the display shows the average
3709b50d902SRodney W. Grimesnumber of pages transferred per second over the last refresh interval.
3719b50d902SRodney W. Grimes.Pp
372a57a22d2SGuy HelmerBelow the paging statistics is a column of lines regarding the virtual
37304984aacSBruce Evansmemory system.
37404984aacSBruce EvansThe first few lines describe,
37504984aacSBruce Evansin units (except as noted below)
37604984aacSBruce Evansof pages per second averaged over the sampling interval,
377a57a22d2SGuy Helmerpages copied on write (`cow'),
378a57a22d2SGuy Helmerpages zero filled on demand (`zfod'),
37904984aacSBruce Evanspages optimally zero filled on demand (`ozfod'),
38004984aacSBruce Evansthe ratio of the (average) ozfod / zfod as a percentage (`%ozfod'),
38104984aacSBruce Evanspages freed by the page daemon (`daefr'),
38204984aacSBruce Evanspages freed by exiting processes (`prcfr'),
383e76bdda0SBruce Evanstotal pages freed (`totfr'),
38404984aacSBruce Evanspages reactivated from the free list (`react'),
38504984aacSBruce Evansthe average number of
38604984aacSBruce Evanstimes per second that the page daemon was awakened (`pdwak'),
38704984aacSBruce Evanspages analyzed by the page daemon (`pdpgs'),
38804984aacSBruce Evansand
38904984aacSBruce Evansin-transit blocking page faults (`intrn').
39004984aacSBruce EvansNote that the units are special for `%ozfod' and `pdwak'.
39104984aacSBruce EvansThe next few lines describe,
39204984aacSBruce Evansas amounts of memory in in kilobytes,
393a57a22d2SGuy Helmerpages wired down (`wire'),
394a57a22d2SGuy Helmeractive pages (`act'),
395a57a22d2SGuy Helmerinactive pages (`inact'),
39671ae8101SBruce Evanspages on the cache queue (`cache'),
397a57a22d2SGuy Helmerand
39804984aacSBruce Evansfree pages (`free').
39904984aacSBruce EvansNote that the values displayed are the current transient ones;
40004984aacSBruce Evansthey are not averages.
4019b50d902SRodney W. Grimes.Pp
40271ae8101SBruce EvansAt the bottom of this column is a line showing the
40371ae8101SBruce Evansamount of virtual memory, in kilobytes, mapped into the buffer cache (`buf').
40471ae8101SBruce EvansThis statistic is not useful.
40571ae8101SBruce EvansIt exists only as a placeholder for the corresponding useful statistic
40671ae8101SBruce Evans(the amount of real memory used to cache disks).
40771ae8101SBruce EvansThe most important component of the latter (the amount of real memory
40871ae8101SBruce Evansused by the vm system to cache disks) is not available,
40971ae8101SBruce Evansbut can be guessed from the `inact' amount under some system loads.
4109b50d902SRodney W. Grimes.Pp
4119b50d902SRodney W. GrimesRunning down the right hand side of the display is a breakdown
4129b50d902SRodney W. Grimesof the interrupts being handled by the system.
4139b50d902SRodney W. GrimesAt the top of the list is the total interrupts per second
4149b50d902SRodney W. Grimesover the time interval.
4159b50d902SRodney W. GrimesThe rest of the column breaks down the total on a device
4169b50d902SRodney W. Grimesby device basis.
4179b50d902SRodney W. GrimesOnly devices that have interrupted at least once since boot time are shown.
4189b50d902SRodney W. Grimes.Pp
4199b50d902SRodney W. GrimesThe following commands are specific to the
4209b50d902SRodney W. Grimes.Ic vmstat
4219b50d902SRodney W. Grimesdisplay; the minimum unambiguous prefix may be supplied.
4229b50d902SRodney W. Grimes.Pp
4239b50d902SRodney W. Grimes.Bl -tag -width Ar -compact
4249b50d902SRodney W. Grimes.It Cm boot
4259b50d902SRodney W. GrimesDisplay cumulative statistics since the system was booted.
4269b50d902SRodney W. Grimes.It Cm run
4279b50d902SRodney W. GrimesDisplay statistics as a running total from the point this
4289b50d902SRodney W. Grimescommand is given.
4299b50d902SRodney W. Grimes.It Cm time
4309b50d902SRodney W. GrimesDisplay statistics averaged over the refresh interval (the default).
4319b50d902SRodney W. Grimes.It Cm zero
4329b50d902SRodney W. GrimesReset running statistics to zero.
4339b50d902SRodney W. Grimes.El
4349b50d902SRodney W. Grimes.It Ic netstat
4356a3e8b0aSRuslan ErmilovDisplay, in the lower window, network connections.
4366a3e8b0aSRuslan ErmilovBy default,
4376a3e8b0aSRuslan Ermilovnetwork servers awaiting requests are not displayed.
4386a3e8b0aSRuslan ErmilovEach address
4399b50d902SRodney W. Grimesis displayed in the format ``host.port'', with each shown symbolically,
4406a3e8b0aSRuslan Ermilovwhen possible.
4416a3e8b0aSRuslan ErmilovIt is possible to have addresses displayed numerically,
4429b50d902SRodney W. Grimeslimit the display to a set of ports, hosts, and/or protocols
4439b50d902SRodney W. Grimes(the minimum unambiguous prefix may be supplied):
4449b50d902SRodney W. Grimes.Pp
4459b50d902SRodney W. Grimes.Bl -tag -width Ar -compact
4469b50d902SRodney W. Grimes.It Cm all
4479b50d902SRodney W. GrimesToggle the displaying of server processes awaiting requests (this
4489b50d902SRodney W. Grimesis the equivalent of the
4499b50d902SRodney W. Grimes.Fl a
4509b50d902SRodney W. Grimesflag to
45179431394SSteve Price.Xr netstat 1 ) .
4529b50d902SRodney W. Grimes.It Cm numbers
4539b50d902SRodney W. GrimesDisplay network addresses numerically.
4549b50d902SRodney W. Grimes.It Cm names
4559b50d902SRodney W. GrimesDisplay network addresses symbolically.
45679431394SSteve Price.It Cm proto Ar protocol
45779431394SSteve PriceDisplay only network connections using the indicated
45879431394SSteve Price.Ar protocol .
45979431394SSteve PriceSupported protocols are ``tcp'', ``udp'', and ``all''.
4609b50d902SRodney W. Grimes.It Cm ignore Op Ar items
4619b50d902SRodney W. GrimesDo not display information about connections associated with
4626a3e8b0aSRuslan Ermilovthe specified hosts or ports.
4636a3e8b0aSRuslan ErmilovHosts and ports may be specified
4646a3e8b0aSRuslan Ermilovby name (``vangogh'', ``ftp''), or numerically.
4656a3e8b0aSRuslan ErmilovHost addresses
4666a3e8b0aSRuslan Ermilovuse the Internet dot notation (``128.32.0.9'').
4676a3e8b0aSRuslan ErmilovMultiple items
4689b50d902SRodney W. Grimesmay be specified with a single command by separating them with
4699b50d902SRodney W. Grimesspaces.
4709b50d902SRodney W. Grimes.It Cm display Op Ar items
4719b50d902SRodney W. GrimesDisplay information about the connections associated with the
4726a3e8b0aSRuslan Ermilovspecified hosts or ports.
4736a3e8b0aSRuslan ErmilovAs for
4749b50d902SRodney W. Grimes.Ar ignore ,
4759b50d902SRodney W. Grimes.Op Ar items
4769b50d902SRodney W. Grimesmay be names or numbers.
4779b50d902SRodney W. Grimes.It Cm show Op Ar ports\&|hosts
4789b50d902SRodney W. GrimesShow, on the command line, the currently selected protocols,
4796a3e8b0aSRuslan Ermilovhosts, and ports.
4806a3e8b0aSRuslan ErmilovHosts and ports which are being ignored
4816a3e8b0aSRuslan Ermilovare prefixed with a `!'.
4826a3e8b0aSRuslan ErmilovIf
4839b50d902SRodney W. Grimes.Ar ports
4849b50d902SRodney W. Grimesor
4859b50d902SRodney W. Grimes.Ar hosts
4869b50d902SRodney W. Grimesis supplied as an argument to
4879b50d902SRodney W. Grimes.Cm show ,
4889b50d902SRodney W. Grimesthen only the requested information will be displayed.
4899b50d902SRodney W. Grimes.It Cm reset
4909b50d902SRodney W. GrimesReset the port, host, and protocol matching mechanisms to the default
4919b50d902SRodney W. Grimes(any protocol, port, or host).
4929b50d902SRodney W. Grimes.El
493b59ba7dfSPoul-Henning Kamp.It Ic ifstat
494b59ba7dfSPoul-Henning KampDisplay the network traffic going through active interfaces on the
4956a3e8b0aSRuslan Ermilovsystem.
4966a3e8b0aSRuslan ErmilovIdle interfaces will not be displayed until they receive some
497b59ba7dfSPoul-Henning Kamptraffic.
498b59ba7dfSPoul-Henning Kamp.Pp
499b59ba7dfSPoul-Henning KampFor each interface being displayed, the current, peak and total
5006a3e8b0aSRuslan Ermilovstatistics are displayed for incoming and outgoing traffic.
5016a3e8b0aSRuslan ErmilovBy default,
502b59ba7dfSPoul-Henning Kampthe
503b59ba7dfSPoul-Henning Kamp.Ic ifstat
504b59ba7dfSPoul-Henning Kampdisplay will automatically scale the units being used so that they are
5056a3e8b0aSRuslan Ermilovin a human-readable format.
5066a3e8b0aSRuslan ErmilovThe scaling units used for the current and
507b59ba7dfSPoul-Henning Kamppeak
508b59ba7dfSPoul-Henning Kamptraffic columns can be altered by the
509b59ba7dfSPoul-Henning Kamp.Ic scale
510b59ba7dfSPoul-Henning Kampcommand.
511ace5be68SRuslan Ermilov.Bl -tag -width ".Cm scale Op Ar units"
512b59ba7dfSPoul-Henning Kamp.It Cm scale Op Ar units
513b59ba7dfSPoul-Henning KampModify the scale used to display the current and peak traffic over all
5146a3e8b0aSRuslan Ermilovinterfaces.
5156a3e8b0aSRuslan ErmilovThe following units are recognised: kbit, kbyte, mbit,
516b59ba7dfSPoul-Henning Kampmbyte, gbit, gbyte and auto.
517b59ba7dfSPoul-Henning Kamp.El
5189b50d902SRodney W. Grimes.El
5199b50d902SRodney W. Grimes.Pp
5209b50d902SRodney W. GrimesCommands to switch between displays may be abbreviated to the
5219b50d902SRodney W. Grimesminimum unambiguous prefix; for example, ``io'' for ``iostat''.
5229b50d902SRodney W. GrimesCertain information may be discarded when the screen size is
5236a3e8b0aSRuslan Ermilovinsufficient for display.
5246a3e8b0aSRuslan ErmilovFor example, on a machine with 10
5259b50d902SRodney W. Grimesdrives the
5269b50d902SRodney W. Grimes.Ic iostat
5276a3e8b0aSRuslan Ermilovbar graph displays only 3 drives on a 24 line terminal.
5286a3e8b0aSRuslan ErmilovWhen
5299b50d902SRodney W. Grimesa bar graph would overflow the allotted screen space it is
5309b50d902SRodney W. Grimestruncated and the actual value is printed ``over top'' of the bar.
5319b50d902SRodney W. Grimes.Pp
5329b50d902SRodney W. GrimesThe following commands are common to each display which shows
5336a3e8b0aSRuslan Ermilovinformation about disk drives.
5346a3e8b0aSRuslan ErmilovThese commands are used to
5359b50d902SRodney W. Grimesselect a set of drives to report on, should your system have
5369b50d902SRodney W. Grimesmore drives configured than can normally be displayed on the
5379b50d902SRodney W. Grimesscreen.
5389b50d902SRodney W. Grimes.Pp
5399b88faecSRuslan Ermilov.Bl -tag -width Ar -compact
5409b50d902SRodney W. Grimes.It Cm ignore Op Ar drives
5416a3e8b0aSRuslan ErmilovDo not display information about the drives indicated.
5426a3e8b0aSRuslan ErmilovMultiple
5439b50d902SRodney W. Grimesdrives may be specified, separated by spaces.
5449b50d902SRodney W. Grimes.It Cm display Op Ar drives
5456a3e8b0aSRuslan ErmilovDisplay information about the drives indicated.
5466a3e8b0aSRuslan ErmilovMultiple drives
5479b50d902SRodney W. Grimesmay be specified, separated by spaces.
5488d2fbde5SJustin T. Gibbs.It Cm only Op Ar drives
5496a3e8b0aSRuslan ErmilovDisplay only the specified drives.
5506a3e8b0aSRuslan ErmilovMultiple drives may be specified,
5518d2fbde5SJustin T. Gibbsseparated by spaces.
5528d2fbde5SJustin T. Gibbs.It Cm drives
5538d2fbde5SJustin T. GibbsDisplay a list of available devices.
554d0353b83SRuslan Ermilov.It Cm match Xo
555d0353b83SRuslan Ermilov.Ar type , Ns Ar if , Ns Ar pass
556d0353b83SRuslan Ermilov.Op | Ar ...
557d0353b83SRuslan Ermilov.Xc
5586a3e8b0aSRuslan ErmilovDisplay devices matching the given pattern.
5596a3e8b0aSRuslan ErmilovThe basic matching
5608d2fbde5SJustin T. Gibbsexpressions are the same as those used in
5618d2fbde5SJustin T. Gibbs.Xr iostat 8
5626a3e8b0aSRuslan Ermilovwith one difference.
5636a3e8b0aSRuslan ErmilovInstead of specifying multiple
5648d2fbde5SJustin T. Gibbs.Fl t
56557bd0fc6SJens Schweikhardtarguments which are then ORed together, the user instead specifies multiple
566d0353b83SRuslan Ermilovmatching expressions joined by the pipe
567d0353b83SRuslan Ermilov.Pq Ql \&|
568d0353b83SRuslan Ermilovcharacter.
569d0353b83SRuslan ErmilovThe comma
5708d2fbde5SJustin T. Gibbsseparated arguments within each matching expression are ANDed together, and
5716a3e8b0aSRuslan Ermilovthen the pipe separated matching expressions are ORed together.
5726a3e8b0aSRuslan ErmilovAny
5738d2fbde5SJustin T. Gibbsdevice matching the combined expression will be displayed, if there is room
5746a3e8b0aSRuslan Ermilovto display it.
5756a3e8b0aSRuslan ErmilovFor example:
5768d2fbde5SJustin T. Gibbs.Pp
5778d2fbde5SJustin T. Gibbs.Dl match da,scsi | cd,ide
5788d2fbde5SJustin T. Gibbs.Pp
5798d2fbde5SJustin T. GibbsThis will display all SCSI Direct Access devices and all IDE CDROM devices.
5808d2fbde5SJustin T. Gibbs.Pp
5818d2fbde5SJustin T. Gibbs.Dl match da | sa | cd,pass
5828d2fbde5SJustin T. Gibbs.Pp
5838d2fbde5SJustin T. GibbsThis will display all Direct Access devices, all Sequential Access devices,
5848d2fbde5SJustin T. Gibbsand all passthrough devices that provide access to CDROM drives.
5859b50d902SRodney W. Grimes.El
5869b50d902SRodney W. Grimes.Sh FILES
5871063e126SJosef Karthauser.Bl -tag -width /boot/kernel/kernel -compact
5881063e126SJosef Karthauser.It Pa /boot/kernel/kernel
5899b50d902SRodney W. GrimesFor the namelist.
5909b50d902SRodney W. Grimes.It Pa /dev/kmem
5919b50d902SRodney W. GrimesFor information in main memory.
5929b50d902SRodney W. Grimes.It Pa /etc/hosts
5939b50d902SRodney W. GrimesFor host names.
5949b50d902SRodney W. Grimes.It Pa /etc/networks
5959b50d902SRodney W. GrimesFor network names.
5969b50d902SRodney W. Grimes.It Pa /etc/services
5979b50d902SRodney W. GrimesFor port names.
5989b50d902SRodney W. Grimes.El
5996c7216dfSRuslan Ermilov.Sh SEE ALSO
6006c7216dfSRuslan Ermilov.Xr netstat 1 ,
6016c7216dfSRuslan Ermilov.Xr kvm 3 ,
6026c7216dfSRuslan Ermilov.Xr icmp 4 ,
6036c7216dfSRuslan Ermilov.Xr icmp6 4 ,
6046c7216dfSRuslan Ermilov.Xr ip 4 ,
6056c7216dfSRuslan Ermilov.Xr ip6 4 ,
6066c7216dfSRuslan Ermilov.Xr tcp 4 ,
6076c7216dfSRuslan Ermilov.Xr udp 4 ,
60826d8ca83SGiorgos Keramidas.Xr gstat 8 ,
6096c7216dfSRuslan Ermilov.Xr iostat 8 ,
6106c7216dfSRuslan Ermilov.Xr vmstat 8
6119b50d902SRodney W. Grimes.Sh HISTORY
6129b50d902SRodney W. GrimesThe
613d8793dfaSPhilippe Charnier.Nm
6149b50d902SRodney W. Grimesprogram appeared in
6159b50d902SRodney W. Grimes.Bx 4.3 .
61603e00a72SGarrett WollmanThe
617630fa006SGarrett Wollman.Ic icmp ,
618630fa006SGarrett Wollman.Ic ip ,
619630fa006SGarrett Wollmanand
620630fa006SGarrett Wollman.Ic tcp
621630fa006SGarrett Wollmandisplays appeared in
62203e00a72SGarrett Wollman.Fx 3.0 ;
62303e00a72SGarrett Wollmanthe notion of having different display modes for the
624630fa006SGarrett Wollman.Tn ICMP ,
6251c79dc84SJoseph Koshy.Tn IP ,
626630fa006SGarrett Wollman.Tn TCP ,
627630fa006SGarrett Wollmanand
628630fa006SGarrett Wollman.Tn UDP
62903e00a72SGarrett Wollmanstatistics was stolen from the
63003e00a72SGarrett Wollman.Fl C
63103e00a72SGarrett Wollmanoption to
63203e00a72SGarrett Wollman.Xr netstat 1
63303e00a72SGarrett Wollmanin Silicon Graphics'
63403e00a72SGarrett Wollman.Tn IRIX
63503e00a72SGarrett Wollmansystem.
6369b50d902SRodney W. Grimes.Sh BUGS
6379b50d902SRodney W. GrimesCertain displays presume a minimum of 80 characters per line.
6389b50d902SRodney W. GrimesThe
6399b50d902SRodney W. Grimes.Ic vmstat
6409b50d902SRodney W. Grimesdisplay looks out of place because it is (it was added in as
6419b50d902SRodney W. Grimesa separate display rather than created as a new program).
642