in_pcb.h now requires ip.h first
[unix-history] / usr / src / usr.bin / systat / systat.1
CommitLineData
6be9699a
KM
1.\" Copyright (c) 1985 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
aababfd1 5.\" @(#)systat.1 6.6 (Berkeley) %G%
6be9699a
KM
6.\"
7.TH SYSTAT 1 ""
8.UC 6
9.SH NAME
10systat \- display system statistics on a crt
11.SH SYNOPSIS
12.B systat
13[
14.RI \- display
15] [
16refresh-interval
17]
18.SH DESCRIPTION
19.B Systat
20displays various system statistics in a screen oriented fashion
21using the curses screen display library,
22.IR curses (3X).
23.PP
24While
25.I systat
26is running the screen is usually divided into two windows (an exception
27is the vmstat display which uses the entire screen). The
28upper window depicts the current system load average. The
29information displayed in the lower window may vary, depending on
30user commands. The last line on the screen is reserved for user
31input and error messages.
32.PP
33By default
34.I systat
35displays the processes getting the largest percentage of the processor
36in the lower window. Other displays show swap space usage, disk i/o
37statistics (a la
38.IR iostat (1)),
39virtual memory statistics (a la
40.IR vmstat (1)),
41network ``mbuf'' utilization, and network connections (a la
42.IR netstat (1)).
43.PP
44Input is interpreted at two different levels.
45A ``global'' command interpreter processes all keyboard input.
46If this command interpreter fails to recognize a command, the
47input line is passed to a per-display command interpreter. This
48allows each display to have certain display-specific commands.
49.PP
50Certain characters cause immediate action by
51.IR systat .
52These are
53.IP ^L
54Refresh the screen.
55.IP ^G
56Print the name of the current ``display'' being shown in
57the lower window and the refresh interval.
58.IP ^Z
59Stop
60.IR systat .
61.IP :
62Move the cursor to the command line and interpret the input
63line typed as a command. While entering a command the
64current character erase, word erase, and line kill characters
65may be used.
66.PP
67The following commands are interpreted by the ``global''
68command interpreter.
69.IP help
70.br
71Print the names of the available displays on the command line.
72.IP load
73.br
74Print the load average over the past 1, 5, and 15 minutes
75on the command line.
76.IP stop
77.br
78Stop refreshing the screen.
79.IP "[ start ] [ number ]"
80.br
81Start (continue) refreshing the screen. If a second, numeric,
82argument is provided it is interpreted as a refresh interval
83(in seconds).
84Supplying only a number will set the refresh interval to this
85value.
86.IP "quit"
87.br
88Exit
89.IR systat .
90(This may be abbreviated to
056978a3 91.IR q .)
6be9699a
KM
92.PP
93The available displays are:
94.IP pigs
95.br
96Display, in the lower window, those processes resident in main
97memory and getting the
98largest portion of the processor (the default display).
99When less than 100% of the
100processor is scheduled to user processes, the remaining time
101is accounted to the ``idle'' process.
102.IP iostat
103.br
104Display, in the lower window, statistics about processor use
105and disk throughput. Statistics on processor use appear as
106bar graphs of the amount of time executing in user mode (``user''),
107in user mode running low priority processes (``nice''), in
108system mode (``system''), and idle (``idle''). Statistics
109on disk throughput show, for each drive, kilobytes of data transferred,
fdc57b8c 110number of disk transactions performed, and average seek time
6be9699a
KM
111(in milliseconds). This information may be displayed as
112bar graphs or as rows of numbers which scroll downward. Bar
113graphs are shown by default; commands specific to this display
114are discussed below.
115.IP swap
116.br
117Display, in the lower window, swap space in use on each swap
118device configured. Two sets of bar graphs are shown. The
119upper graph displays swap space allocated to pure text segments
120(code), the lower graph displays space allocated to stack and
121data segments. Allocated space is sorted by its size into buckets
122of size dmmin, dmmin*2, dmmin*4, up to dmmax (to reflect allocation
123policies imposed by the system). The disk segment size, in sectors,
124is displayed along the left hand side of the text,
125and data and stack graphs.
126Space allocated to the user structure and page
127tables is not currently accounted for.
128.IP mbufs
129.br
130Display, in the lower window, the number of mbufs allocated
131for particular uses, i.e. data, socket structures, etc.
132.IP vmstat
133.br
134Take over the entire display and show a (rather crowded) compendium
135of statistics related to virtual memory usage, process scheduling,
136device interrupts, system name translation cacheing, disk i/o, etc.
ecaa0bb9 137.IP
ab3c309d
KM
138The upper left quadrant of the screen shows the number
139of users logged in and the load average over the last one, five,
fdc57b8c 140and fifteen minute intervals.
ab3c309d
KM
141Below this line are statistics on memory utilization.
142The first row of the table reports memory usage only among
fdc57b8c 143active processes, that is processes that have run in the previous
ab3c309d
KM
144twenty seconds.
145The second row reports on memory usage of all processes.
146The first column reports on the number of physical pages
147claimed by processes.
148The second column reports the number of physical pages that
149are devoted to read only text pages.
150The third and fourth columns report the same two figures for
151virtual pages, that is the number of pages that would be
152needed if all processes had all of their pages.
153Finally the last column shows the number of physical pages
154on the free list.
ecaa0bb9 155.IP
ab3c309d
KM
156Below the memory display is the disk usage display.
157It reports the number of seeks, transfers, and number
158of kilobyte blocks transferred per second averaged over the
159refresh period of the display (by default, five seconds).
fdc57b8c 160For some disks it also reports the average milliseconds per seek.
ab3c309d 161Note that the system only keeps statistics on at most four disks.
ecaa0bb9 162.IP
ab3c309d
KM
163Below the disk display is a list of the
164average number of processes (over the last refresh interval)
fdc57b8c 165that are runnable (`r'), in page wait (`p'),
ab3c309d
KM
166in disk wait other than paging (`d'),
167sleeping (`s'), and swapped out but desiring to run (`w').
168Below the queue length listing is a numerical listing and
169a bar graph showing the amount of
170system (shown as `='), user (shown as `>'),
171nice (shown as `-'), and idle time (shown as ` ').
ecaa0bb9 172.IP
ab3c309d 173At the bottom left are statistics on name translations.
fdc57b8c 174It lists the number of names translated in the previous interval,
ab3c309d
KM
175the number and percentage of the translations that were
176handled by the system wide name translation cache, and
177the number and percentage of the translations that were
178handled by the per process name translation cache.
ecaa0bb9 179.IP
ab3c309d
KM
180Under the date in the upper right hand quadrant are statistics
181on paging and swapping activity.
182The first two columns report the average number of pages
183brought in and out per second over the last refresh interval
184due to page faults and the paging daemon.
185The third and fourth columns report the average number of pages
186brought in and out per second over the last refresh interval
187due to swap requests initiated by the scheduler.
188The first row of the display shows the average
189number of disk transfers per second over the last refresh interval;
190the second row of the display shows the average
191number of pages transferred per second over the last refresh interval.
ecaa0bb9 192.IP
ab3c309d
KM
193Below the paging statistics is a line listing the average number of
194total reclaims ('Rec'),
195intransit blocking page faults (`It'),
196swap text pages found in free list (`F/S'),
197file system text pages found in free list (`F/F'),
198reclaims from free list (`RFL'),
199pages freed by the clock daemon (`Fre'),
200and sequential process pages freed (`SFr')
201per second over the refresh interval.
ecaa0bb9 202.IP
ab3c309d
KM
203Below this line are statistics on the average number of
204zero filled pages (`zf') and demand filled text pages (`xf')
205per second over the refresh period.
206The first row indicates the number of requests that were
207resolved, the second row shows the number that were set up,
208and the last row shows the percentage of setup requests were
209actually used.
210Note that this percentage is usually less than 100%,
211however it may exceed 100% if a large number of requests
212are actually used long after they were set up during a
213period when no new pages are being set up.
214Thus this figure is most interesting when observed over
215a long time period, such as from boot time
216(see below on getting such a display).
ecaa0bb9 217.IP
ab3c309d
KM
218Below the page fill statistics is a column that
219lists the average number of context switches (`Csw'),
aababfd1 220traps (`Trp'; includes page faults), system calls (`Sys'), interrupts (`Int'),
ab3c309d 221characters output to DZ ports using pseudo-DMA (`Pdm'),
aababfd1 222network software interrupts (`Sof'),
ab3c309d
KM
223page faults (`Flt'), pages scanned by the page daemon (`Scn'),
224and revolutions of the page daemon's hand (`Rev')
225per second over the refresh interval.
ecaa0bb9 226.IP
ab3c309d
KM
227Running down the right hand side of the display is a breakdown
228of the interrupts being handled by the system.
229At the top of the list is the total interrupts per second
230over the time interval.
231The rest of the column breaks down the total on a device
232by device basis.
233Only devices that have interrupted at least once since boot time are shown.
6be9699a
KM
234.IP netstat
235.br
236Display, in the lower window, network connections. By default,
237network servers awaiting requests are not displayed. Each address
238is displayed in the format ``host.port'', with each shown symbolically,
239when possible. It is possible to have addresses displayed numerically,
240limit the display to a set of ports, hosts, and/or protocols; see the
ecaa0bb9 241list of commands below.
6be9699a
KM
242.PP
243Commands to switch between displays may be abbreviated to the
244minimum unambiguous prefix; for example, ``io'' for ``iostat''.
245Certain information may be discarded when the screen size is
246insufficient for display. For example, on a machine with 10
247drives the
248.I iostat
249bar graph displays only 3 drives on a 24 line terminal. When
250a bar graph would overflow the allotted screen space it is
251truncated and the actual value is printed ``over top'' of the bar.
252.PP
253The following commands are specific to the
254.I iostat
255display; the minimum unambiguous prefix may be supplied.
256.IP numbers
257Show the disk i/o statistics in numeric form. Values are
258displayed in numeric columns which scroll downward.
259.IP bars
260Show the disk i/o statistics in bar graph form (default).
261.IP msps
262Toggle the display of average seek time (the default is to
263not display seek times).
6be9699a
KM
264.PP
265The following commands are specific to the
266.I vmstat
267display; the minimum unambiguous prefix may be supplied.
268.IP boot
fdc57b8c 269Display cumulative statistics since the system was booted.
6be9699a
KM
270.IP run
271Display statistics as a running total from the point this
272command is given.
273.IP time
274Display statistics averaged over the refresh interval (the default).
275.IP zero
276Reset running statistics to zero.
277.PP
ecaa0bb9
SL
278The following commands are common to each display which shows
279information about disk drives. These commands are used to
280select a set of drives to report on, should your system have
281more drives configured than can normally be displayed on the
282screen.
283.IP "ignore [ drives ]"
284Do not display information about the drives indicated. Multiple
285drives may be specified, separated by spaces.
286.IP "display [ drives ]"
287Display information about the drives indicated. Multiple drives
288may be specified, separated by spaces.
289.PP
290The following command is specific to the
6be9699a
KM
291.I netstat
292display; the minimum unambiguous prefix may be supplied.
293.IP all
294Toggle the displaying of server processes awaiting requests (this
295is the equivalent of the
296.B \-a
297flag to
298.IR netstat (1)).
299.IP numbers
300Display network addresses numerically.
301.IP names
302Display network addresses symbolically.
ecaa0bb9
SL
303.PP
304The remaining commands are common to displays which report
305network connections (currently only the
306.I netstat
307display). These commands may be used to select a specific set
308of connections for
309.I systat
310to report on.
311.IP "\fIprotocol\fP"
312Display only network connections using the indicated protocol
313(currently either ``tcp'' or ``udp'').
314.IP "ignore [items]"
315Do not display information about connections associated with
316the specified hosts or ports. Hosts and ports may be specified
317by name (``ucbmonet'', ``ftp''), or numerically. Host addresses
318use the Internet dot notation (``128.32.0.9''). Multiple items
319may be specified with a single command by separating them with
320spaces.
321.IP "display [items]"
322Display information about the connections associated with the
323specified hosts or ports. As for
324.IR ignore ,
fdc57b8c
JL
325.I items
326may be names or numbers.
ecaa0bb9
SL
327.IP "show [ports|hosts]"
328Show, on the command line, the currently selected protocols,
329hosts, and ports. Hosts and ports which are being ignored
330are prefixed with a `!'. If
331.I ports
332or
333.I hosts
fdc57b8c 334is supplied as an argument to
ecaa0bb9 335.IR show ,
fdc57b8c 336then only the requested information will be displayed.
6be9699a
KM
337.IP "reset"
338Reset the port, host, and protocol matching mechanisms to the default
339(any protocol, port, or host).
340.SH FILES
341.nf
342.ta \w'/dev/services 'u
343/vmunix for the namelist
344/dev/kmem for information in main memory
345/dev/drum for information about swapped out processes
346/etc/hosts for host names
347/etc/networks for network names
348/etc/services for port names
349.SH AUTHOR
ecaa0bb9
SL
350The unknown hacker. The
351.I pigs
352display is derived from a program of the same name
353written by Bill Reeves.
6be9699a
KM
354.SH BUGS
355Takes 2-10 percent of the cpu. Certain displays presume
356a 24 line by 80 character terminal. The swap space display
357should account for space allocated to the user structure and
fdc57b8c 358page tables. The
6be9699a
KM
359.I vmstat
360display looks out of place because it is (it was added in as
fdc57b8c 361a separate display rather than create a new program).
6be9699a
KM
362.PP
363The whole
fdc57b8c 364thing is pretty hokey and was included in the distribution under
6be9699a 365serious duress.