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