rmdel is already linked
[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.\"
056978a3 5.\" @(#)systat.1 6.5 (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'),
220traps (`Trp'), system calls (`Sys'), interrupts (`Int'),
221characters output to DZ ports using pseudo-DMA (`Pdm'),
222page faults (`Flt'), pages scanned by the page daemon (`Scn'),
223and revolutions of the page daemon's hand (`Rev')
224per second over the refresh interval.
ecaa0bb9 225.IP
ab3c309d
KM
226Running down the right hand side of the display is a breakdown
227of the interrupts being handled by the system.
228At the top of the list is the total interrupts per second
229over the time interval.
230The rest of the column breaks down the total on a device
231by device basis.
232Only devices that have interrupted at least once since boot time are shown.
6be9699a
KM
233.IP netstat
234.br
235Display, in the lower window, network connections. By default,
236network servers awaiting requests are not displayed. Each address
237is displayed in the format ``host.port'', with each shown symbolically,
238when possible. It is possible to have addresses displayed numerically,
239limit the display to a set of ports, hosts, and/or protocols; see the
ecaa0bb9 240list of commands below.
6be9699a
KM
241.PP
242Commands to switch between displays may be abbreviated to the
243minimum unambiguous prefix; for example, ``io'' for ``iostat''.
244Certain information may be discarded when the screen size is
245insufficient for display. For example, on a machine with 10
246drives the
247.I iostat
248bar graph displays only 3 drives on a 24 line terminal. When
249a bar graph would overflow the allotted screen space it is
250truncated and the actual value is printed ``over top'' of the bar.
251.PP
252The following commands are specific to the
253.I iostat
254display; the minimum unambiguous prefix may be supplied.
255.IP numbers
256Show the disk i/o statistics in numeric form. Values are
257displayed in numeric columns which scroll downward.
258.IP bars
259Show the disk i/o statistics in bar graph form (default).
260.IP msps
261Toggle the display of average seek time (the default is to
262not display seek times).
6be9699a
KM
263.PP
264The following commands are specific to the
265.I vmstat
266display; the minimum unambiguous prefix may be supplied.
267.IP boot
fdc57b8c 268Display cumulative statistics since the system was booted.
6be9699a
KM
269.IP run
270Display statistics as a running total from the point this
271command is given.
272.IP time
273Display statistics averaged over the refresh interval (the default).
274.IP zero
275Reset running statistics to zero.
276.PP
ecaa0bb9
SL
277The following commands are common to each display which shows
278information about disk drives. These commands are used to
279select a set of drives to report on, should your system have
280more drives configured than can normally be displayed on the
281screen.
282.IP "ignore [ drives ]"
283Do not display information about the drives indicated. Multiple
284drives may be specified, separated by spaces.
285.IP "display [ drives ]"
286Display information about the drives indicated. Multiple drives
287may be specified, separated by spaces.
288.PP
289The following command is specific to the
6be9699a
KM
290.I netstat
291display; the minimum unambiguous prefix may be supplied.
292.IP all
293Toggle the displaying of server processes awaiting requests (this
294is the equivalent of the
295.B \-a
296flag to
297.IR netstat (1)).
298.IP numbers
299Display network addresses numerically.
300.IP names
301Display network addresses symbolically.
ecaa0bb9
SL
302.PP
303The remaining commands are common to displays which report
304network connections (currently only the
305.I netstat
306display). These commands may be used to select a specific set
307of connections for
308.I systat
309to report on.
310.IP "\fIprotocol\fP"
311Display only network connections using the indicated protocol
312(currently either ``tcp'' or ``udp'').
313.IP "ignore [items]"
314Do not display information about connections associated with
315the specified hosts or ports. Hosts and ports may be specified
316by name (``ucbmonet'', ``ftp''), or numerically. Host addresses
317use the Internet dot notation (``128.32.0.9''). Multiple items
318may be specified with a single command by separating them with
319spaces.
320.IP "display [items]"
321Display information about the connections associated with the
322specified hosts or ports. As for
323.IR ignore ,
fdc57b8c
JL
324.I items
325may be names or numbers.
ecaa0bb9
SL
326.IP "show [ports|hosts]"
327Show, on the command line, the currently selected protocols,
328hosts, and ports. Hosts and ports which are being ignored
329are prefixed with a `!'. If
330.I ports
331or
332.I hosts
fdc57b8c 333is supplied as an argument to
ecaa0bb9 334.IR show ,
fdc57b8c 335then only the requested information will be displayed.
6be9699a
KM
336.IP "reset"
337Reset the port, host, and protocol matching mechanisms to the default
338(any protocol, port, or host).
339.SH FILES
340.nf
341.ta \w'/dev/services 'u
342/vmunix for the namelist
343/dev/kmem for information in main memory
344/dev/drum for information about swapped out processes
345/etc/hosts for host names
346/etc/networks for network names
347/etc/services for port names
348.SH AUTHOR
ecaa0bb9
SL
349The unknown hacker. The
350.I pigs
351display is derived from a program of the same name
352written by Bill Reeves.
6be9699a
KM
353.SH BUGS
354Takes 2-10 percent of the cpu. Certain displays presume
355a 24 line by 80 character terminal. The swap space display
356should account for space allocated to the user structure and
fdc57b8c 357page tables. The
6be9699a
KM
358.I vmstat
359display looks out of place because it is (it was added in as
fdc57b8c 360a separate display rather than create a new program).
6be9699a
KM
361.PP
362The whole
fdc57b8c 363thing is pretty hokey and was included in the distribution under
6be9699a 364serious duress.