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