Commit | Line | Data |
---|---|---|
de40fd0b | 1 | .\" Copyright (c) 1980, 1991, 1993, 1994 |
06b591cb | 2 | .\" The Regents of the University of California. All rights reserved. |
3a8113b3 | 3 | .\" |
be91a597 | 4 | .\" %sccs.include.redist.man% |
3a8113b3 | 5 | .\" |
8114d14f | 6 | .\" @(#)pstat.8 8.5 (Berkeley) %G% |
be91a597 KM |
7 | .\" |
8 | .Dd | |
9 | .Dt PSTAT 8 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm pstat | |
13 | .Nd display system data structures | |
14 | .Sh SYNOPSIS | |
15 | .Nm pstat | |
907a6559 KM |
16 | .Op Fl Tfnstv |
17 | .Op Fl M Ar core | |
18 | .Op Fl N Ar system | |
be91a597 KM |
19 | .Sh DESCRIPTION |
20 | .Nm Pstat | |
907a6559 KM |
21 | displays open file entry, swap space utilization, |
22 | terminal state, and vnode data structures. | |
3a8113b3 | 23 | If |
be91a597 | 24 | .Ar corefile |
2e9b3e06 | 25 | is given, the information is sought there, otherwise |
3a8113b3 | 26 | in |
be91a597 | 27 | .Pa /dev/kmem . |
3a8113b3 | 28 | The required namelist is taken from |
be91a597 | 29 | .Pa /vmunix |
be3c220c | 30 | unless |
be91a597 | 31 | .Ar system |
be3c220c | 32 | is specified. |
907a6559 KM |
33 | The |
34 | .Fl n | |
35 | option specifies that devices should be printed out by major/minor | |
36 | number rather than by name. | |
37 | .Pp | |
3a8113b3 | 38 | Options are |
907a6559 KM |
39 | .Bl -tag -width indent |
40 | .It Fl T | |
be91a597 | 41 | Prints the number of used and free slots in the several system tables |
907a6559 KM |
42 | and is useful for checking to see how large system tables have become |
43 | if the system is under heavy load. | |
44 | .It Fl f | |
be91a597 | 45 | Print the open file table with these headings: |
907a6559 KM |
46 | .Bl -tag -width indent |
47 | .It LOC | |
3a8113b3 | 48 | The core location of this table entry. |
907a6559 | 49 | .It TYPE |
be91a597 | 50 | The type of object the file table entry points to. |
907a6559 | 51 | .It FLG |
3a8113b3 | 52 | Miscellaneous state variables encoded thus: |
907a6559 KM |
53 | .Bl -tag -width indent |
54 | .It R | |
be91a597 | 55 | open for reading |
907a6559 | 56 | .It W |
be91a597 | 57 | open for writing |
907a6559 | 58 | .It A |
be91a597 | 59 | open for appending |
907a6559 | 60 | .It S |
be91a597 | 61 | shared lock present |
907a6559 | 62 | .It X |
be91a597 | 63 | exclusive lock present |
907a6559 | 64 | .It I |
be91a597 | 65 | signal pgrp when data ready |
907a6559 KM |
66 | .El |
67 | .It CNT | |
be91a597 | 68 | Number of processes that know this open file. |
907a6559 | 69 | .It MSG |
be91a597 | 70 | Number of messages outstanding for this file. |
907a6559 | 71 | .It DATA |
be91a597 | 72 | The location of the vnode table entry or socket structure for this file. |
907a6559 | 73 | .It OFFSET |
be91a597 KM |
74 | The file offset (see |
75 | .Xr lseek 2 ) . | |
907a6559 KM |
76 | .El |
77 | .It Fl s | |
78 | Print information about swap space usage on all the | |
79 | swap areas compiled into the kernel. | |
80 | The first column is the device name of the partition. The next column is | |
81 | the total space available in the partition. The | |
82 | .Ar Used | |
83 | column indicates the total blocks used so far; the | |
84 | .Ar Available | |
85 | column indicates how much space is remaining on each partition. | |
86 | The | |
87 | .Ar Capacity | |
88 | reports the percentage of space used. | |
89 | .Pp | |
90 | If more than one partition is configured into the system, totals for all | |
91 | of the statistics will be reported in the final line of the report. | |
92 | .It Fl t | |
3a8113b3 KM |
93 | Print table for terminals |
94 | with these headings: | |
907a6559 KM |
95 | .Bl -tag -width indent |
96 | .It RAW | |
3a8113b3 | 97 | Number of characters in raw input queue. |
907a6559 | 98 | .It CAN |
3a8113b3 | 99 | Number of characters in canonicalized input queue. |
907a6559 | 100 | .It OUT |
3a8113b3 | 101 | Number of characters in putput queue. |
907a6559 | 102 | .It MODE |
3a8113b3 | 103 | See |
be91a597 | 104 | .Xr tty 4 . |
907a6559 | 105 | .It ADDR |
3a8113b3 | 106 | Physical device address. |
907a6559 | 107 | .It DEL |
3a8113b3 | 108 | Number of delimiters (newlines) in canonicalized input queue. |
907a6559 | 109 | .It COL |
3a8113b3 | 110 | Calculated column position of terminal. |
907a6559 | 111 | .It STATE |
3a8113b3 | 112 | Miscellaneous state variables encoded thus: |
907a6559 KM |
113 | .Bl -tag -width indent |
114 | .It T | |
53536069 | 115 | delay timeout in progress |
907a6559 | 116 | .It W |
3a8113b3 | 117 | waiting for open to complete |
907a6559 | 118 | .It O |
3a8113b3 | 119 | open |
907a6559 | 120 | .It F |
53536069 | 121 | outq has been flushed during DMA |
907a6559 | 122 | .It C |
3a8113b3 | 123 | carrier is on |
907a6559 | 124 | .It B |
3a8113b3 | 125 | busy doing output |
907a6559 | 126 | .It A |
3a8113b3 | 127 | process is awaiting output |
907a6559 | 128 | .It X |
3a8113b3 | 129 | open for exclusive use |
907a6559 | 130 | .It S |
53536069 | 131 | output stopped |
907a6559 | 132 | .It H |
3a8113b3 | 133 | hangup on close |
907a6559 KM |
134 | .El |
135 | .It PGRP | |
3a8113b3 | 136 | Process group for which this is controlling terminal. |
907a6559 | 137 | .It DISC |
be91a597 KM |
138 | Line discipline; blank is old tty |
139 | OTTYDISC | |
140 | or | |
141 | .Ql new tty | |
142 | for | |
143 | NTTYDISC | |
144 | or | |
145 | .Ql net | |
146 | for | |
147 | NETLDISC | |
148 | (see | |
149 | .Xr bk 4 ) . | |
907a6559 KM |
150 | .El |
151 | .It Fl v | |
de40fd0b | 152 | Print the active vnodes. Each group of vnodes corresponding |
be91a597 KM |
153 | to a particular filesystem is preceded by a two line header. The |
154 | first line consists of the following: | |
155 | .Pp | |
156 | .Df I | |
157 | .No *** MOUNT Em fstype from | |
158 | on | |
159 | .Em on fsflags | |
160 | .De | |
161 | .Pp | |
162 | where | |
163 | .Em fstype | |
164 | is one of | |
165 | .Em ufs , nfs , mfs , or pc ; | |
166 | .Em from | |
167 | is the filesystem is mounted from; | |
168 | .Em on | |
169 | is the directory | |
170 | the filesystem is mounted on; and | |
171 | .Em fsflags | |
172 | is a list | |
173 | of optional flags applied to the mount (see | |
174 | .Xr mount 8 ) . | |
175 | .The second line is a header for the individual fields , | |
176 | the first part of which are fixed, and the second part are filesystem | |
177 | type specific. The headers common to all vnodes are: | |
907a6559 KM |
178 | .Bl -tag -width indent |
179 | .It ADDR | |
be91a597 | 180 | Location of this vnode. |
907a6559 | 181 | .It TYP |
be91a597 | 182 | File type. |
907a6559 | 183 | .It VFLAG |
be91a597 | 184 | .Pp |
907a6559 KM |
185 | A list of letters representing vnode flags: |
186 | .Bl -tag -width indent | |
187 | .It R | |
be91a597 | 188 | \- VROOT |
907a6559 | 189 | .It T |
be91a597 | 190 | \- VTEXT |
907a6559 | 191 | .It L |
be91a597 | 192 | \- VXLOCK |
907a6559 | 193 | .It W |
be91a597 | 194 | \- VXWANT |
907a6559 | 195 | .It E |
be91a597 | 196 | \- VEXLOCK |
907a6559 | 197 | .It S |
be91a597 | 198 | \- VSHLOCK |
907a6559 | 199 | .It T |
be91a597 | 200 | \- VLWAIT |
907a6559 | 201 | .It A |
be91a597 | 202 | \- VALIASED |
907a6559 | 203 | .It B |
be91a597 | 204 | \- VBWAIT |
907a6559 | 205 | .El |
be91a597 | 206 | .Pp |
355acd0f JSP |
207 | .It USE |
208 | The number of references to this vnode. | |
209 | .It HOLD | |
210 | The number of I/O buffers held by this vnode. | |
211 | .It FILEID | |
212 | The vnode fileid. | |
213 | In the case of | |
214 | .Em ufs | |
215 | this is the inode number. | |
216 | .It IFLAG | |
217 | Miscellaneous filesystem specific state variables encoded thus: | |
218 | .Bl -tag -width indent | |
219 | .It "For ufs:" | |
220 | .Pp | |
907a6559 KM |
221 | .Bl -tag -width indent |
222 | .It L | |
be91a597 | 223 | locked |
907a6559 | 224 | .It U |
be91a597 KM |
225 | update time |
226 | .Pq Xr fs 5 | |
227 | must be corrected | |
907a6559 | 228 | .It A |
be91a597 | 229 | access time must be corrected |
907a6559 | 230 | .It W |
be91a597 | 231 | wanted by another process (L flag is on) |
907a6559 | 232 | .It C |
be91a597 | 233 | changed time must be corrected |
907a6559 | 234 | .It S |
be91a597 | 235 | shared lock applied |
907a6559 | 236 | .It E |
be91a597 | 237 | exclusive lock applied |
907a6559 | 238 | .It Z |
be91a597 | 239 | someone waiting for a lock |
907a6559 | 240 | .It M |
be91a597 | 241 | contains modifications |
907a6559 | 242 | .It R |
be91a597 | 243 | has a rename in progress |
907a6559 | 244 | .El |
355acd0f JSP |
245 | .It "For nfs:" |
246 | .Bl -tag -width indent | |
247 | .It W | |
248 | waiting for I/O buffer flush to complete | |
249 | .It P | |
250 | I/O buffers being flushed | |
251 | .It M | |
252 | locally modified data exists | |
253 | .It E | |
254 | an earlier write failed | |
255 | .It X | |
390cbc21 | 256 | non-cacheable lease (nqnfs) |
355acd0f JSP |
257 | .It O |
258 | write lease (nqnfs) | |
259 | .It G | |
260 | lease was evicted (nqnfs) | |
261 | .El | |
262 | .El | |
263 | .It SIZ/RDEV | |
be91a597 KM |
264 | Number of bytes in an ordinary file, or |
265 | major and minor device of special file. | |
907a6559 KM |
266 | .El |
267 | .El | |
be91a597 | 268 | .Sh FILES |
907a6559 KM |
269 | .Bl -tag -width /dev/kmemxxx -compact |
270 | .It Pa /vmunix | |
be91a597 | 271 | namelist |
907a6559 | 272 | .It Pa /dev/kmem |
be91a597 | 273 | default source of tables |
907a6559 | 274 | .El |
be91a597 KM |
275 | .Sh SEE ALSO |
276 | .Xr iostat 1 , | |
277 | .Xr ps 1 , | |
278 | .Xr systat 1 , | |
279 | .Xr vmstat 1 , | |
280 | .Xr stat 2 , | |
281 | .Xr fs 5 , | |
282 | .Rs | |
283 | .Rt Tn UNIX Rt Implementation , | |
284 | .Ra K. Thompson | |
285 | .Re | |
286 | .Sh BUGS | |
907a6559 KM |
287 | Swap statistics are reported for all swap partitions compiled into the kernel, |
288 | regardless of whether those partitions are being used. | |
289 | .Pp | |
290 | Does not understand NFS swap servers. | |
be91a597 KM |
291 | .Sh HISTORY |
292 | The | |
907a6559 | 293 | .Nm pstat |
be91a597 | 294 | command appeared in 4.0BSD. |