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