Commit | Line | Data |
---|---|---|
3a8113b3 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
2e9b3e06 | 5 | .\" @(#)pstat.8 6.7 (Berkeley) %G% |
3a8113b3 | 6 | .\" |
be5ac2e5 | 7 | .TH PSTAT 8 "" |
3a8113b3 KM |
8 | .UC 4 |
9 | .SH NAME | |
2e9b3e06 | 10 | pstat \- display system data structures |
3a8113b3 | 11 | .SH SYNOPSIS |
ca615ffd | 12 | .B pstat |
be3c220c | 13 | [ |
2e9b3e06 MT |
14 | .B \-Tpfvtsxn |
15 | ] [ | |
16 | .B \-U | |
17 | .I pid | |
be3c220c KM |
18 | ] [ |
19 | .B system | |
20 | ] [ | |
21 | .B corefile | |
22 | ] | |
3a8113b3 KM |
23 | .SH DESCRIPTION |
24 | .I Pstat | |
2e9b3e06 | 25 | displays certain system data structures. |
3a8113b3 | 26 | If |
be3c220c | 27 | .I corefile |
2e9b3e06 | 28 | is given, the information is sought there, otherwise |
3a8113b3 KM |
29 | in |
30 | .I /dev/kmem. | |
31 | The required namelist is taken from | |
be3c220c KM |
32 | .I /vmunix |
33 | unless | |
34 | .I system | |
35 | is specified. | |
3a8113b3 | 36 | Options are |
2e9b3e06 | 37 | .\" ??? .TP \w'WCHAN\ 'u |
3a8113b3 | 38 | .TP |
2e9b3e06 MT |
39 | .B \-v |
40 | Print the active vnodes. Each group of vnodes coresponding | |
41 | to a particular filesystem is preceded by a two line header. The | |
42 | first line consists of the following: | |
43 | .sp | |
44 | *** MOUNT \fIfstype from \fPon \fIon fsflags\fP | |
45 | .sp | |
46 | where \fIfstype\fP is one of \fBufs, nfs, mfs, or pc\fP; \fIfrom\fP | |
47 | is the filesystem is mounted from; \fIon\fP is the directory | |
48 | the filesystem is mounted on; and \fIfsflags\fP is a list | |
49 | of optional flags applied to the mount (see | |
50 | .IR mount (8)). The second line is a header for the individual fields, | |
51 | the first part of which are fixed, and the second part are filesystem | |
52 | type specific. The headers common to all vnodes are: | |
53 | .IP ADDR | |
54 | Location of this vnode. | |
55 | .IP TYP | |
56 | File type. | |
57 | .IP VFLAG | |
58 | A list of letters representing vnode flags: | |
59 | .nf | |
60 | .sp | |
61 | R - VROOT | |
62 | T - VTEXT | |
63 | L - VXLOCK | |
64 | W - VXWANT | |
65 | E - VEXLOCK | |
66 | S - VSHLOCK | |
67 | T - VLWAIT | |
68 | A - VALIASED | |
69 | B - VBWAIT | |
70 | .sp | |
71 | **** WAS HERE ***** | |
72 | .fi | |
73 | Next | |
3a8113b3 KM |
74 | .IP LOC |
75 | The core location of this table entry. | |
76 | .PD 0 | |
77 | .IP FLAGS | |
78 | Miscellaneous state variables encoded thus: | |
79 | .RS | |
80 | .IP L | |
81 | locked | |
82 | .IP U | |
83 | update time | |
be3c220c | 84 | .RI ( fs (5)) |
3a8113b3 KM |
85 | must be corrected |
86 | .IP A | |
87 | access time must be corrected | |
3a8113b3 KM |
88 | .IP W |
89 | wanted by another process (L flag is on) | |
3a8113b3 KM |
90 | .IP C |
91 | changed time must be corrected | |
be3c220c KM |
92 | .IP S |
93 | shared lock applied | |
94 | .IP E | |
95 | exclusive lock applied | |
96 | .IP Z | |
0ecf4440 | 97 | someone waiting for a lock |
9eecf21c KM |
98 | .IP M |
99 | contains modifications | |
100 | .IP R | |
101 | has a rename in progress | |
3a8113b3 KM |
102 | .RE |
103 | .IP CNT | |
104 | Number of open file table entries for this inode. | |
105 | .IP DEV | |
106 | Major and minor device number of file system in which | |
107 | this inode resides. | |
be3c220c KM |
108 | .IP RDC |
109 | Reference count of shared locks on the inode. | |
110 | .IP WRC | |
111 | Reference count of exclusive locks on the inode (this may | |
112 | be > 1 if, for example, a file descriptor is inherited across a fork). | |
3a8113b3 KM |
113 | .IP INO |
114 | I-number within the device. | |
115 | .IP MODE | |
116 | Mode bits, see | |
117 | .IR chmod (2). | |
118 | .IP NLK | |
119 | Number of links to this inode. | |
120 | .IP UID | |
121 | User ID of owner. | |
122 | .IP SIZ/DEV | |
123 | Number of bytes in an ordinary file, or | |
124 | major and minor device of special file. | |
125 | .PD | |
126 | .TP | |
127 | .B \-x | |
128 | Print the text table with these headings: | |
129 | .IP LOC | |
130 | The core location of this table entry. | |
131 | .PD 0 | |
132 | .IP FLAGS | |
133 | Miscellaneous state variables encoded thus: | |
134 | .RS | |
135 | .IP T | |
136 | .IR ptrace (2) | |
137 | in effect | |
138 | .IP W | |
139 | text not yet written on swap device | |
140 | .IP L | |
141 | loading in progress | |
142 | .IP K | |
143 | locked | |
144 | .IP w | |
145 | wanted (L flag is on) | |
146 | .IP P | |
9eecf21c | 147 | resulted from demand-page-from-vnode exec format (see |
be3c220c | 148 | .IR execve (2)) |
3a8113b3 KM |
149 | .RE |
150 | .PD | |
151 | .IP DADDR | |
152 | Disk address in swap, measured in multiples of 512 bytes. | |
153 | .IP CADDR | |
154 | Head of a linked list of loaded processes using this text segment. | |
53536069 JL |
155 | .IP RSS |
156 | Size of resident text, measured in multiples of 512 bytes. | |
3a8113b3 KM |
157 | .IP SIZE |
158 | Size of text segment, measured in multiples of 512 bytes. | |
9eecf21c KM |
159 | .IP VPTR |
160 | Core location of corresponding vnode. | |
3a8113b3 KM |
161 | .IP CNT |
162 | Number of processes using this text segment. | |
163 | .IP CCNT | |
164 | Number of processes in core using this text segment. | |
53536069 JL |
165 | .IP FORW |
166 | Forward link in free list. | |
167 | .IP BACK | |
168 | Backward link in free list. | |
3a8113b3 KM |
169 | .PD |
170 | .TP | |
171 | .B \-p | |
172 | Print process table for active processes with these headings: | |
173 | .IP LOC | |
174 | The core location of this table entry. | |
175 | .PD 0 | |
176 | .IP S | |
177 | Run state encoded thus: | |
178 | .RS | |
179 | .IP 0 | |
180 | no process | |
181 | .IP 1 | |
182 | waiting for some event | |
183 | .IP 3 | |
184 | runnable | |
185 | .IP 4 | |
186 | being created | |
187 | .IP 5 | |
188 | being terminated | |
189 | .IP 6 | |
0ecf4440 | 190 | stopped (by signal or under trace) |
3a8113b3 KM |
191 | .RE |
192 | .IP F | |
0ecf4440 | 193 | Miscellaneous state variables, or'ed together (hexadecimal): |
3a8113b3 | 194 | .RS |
53536069 | 195 | .IP 0001 9n |
3a8113b3 | 196 | loaded |
53536069 | 197 | .IP 0002 |
3a8113b3 | 198 | the scheduler process |
53536069 | 199 | .IP 0004 |
3a8113b3 | 200 | locked for swap out |
53536069 | 201 | .IP 0008 |
3a8113b3 | 202 | swapped out |
53536069 | 203 | .IP 0010 |
3a8113b3 | 204 | traced |
53536069 | 205 | .IP 0020 |
3a8113b3 | 206 | used in tracing |
be3c220c KM |
207 | . \".IP 000040 |
208 | . \"locked in by | |
209 | . \".IR lock (2). | |
53536069 | 210 | .IP 0080 |
3a8113b3 | 211 | in page-wait |
53536069 | 212 | .IP 0100 |
3a8113b3 KM |
213 | prevented from swapping during |
214 | .IR fork (2) | |
53536069 JL |
215 | .IP 0200 |
216 | will restore old mask after taking signal | |
217 | .IP 0400 | |
3a8113b3 | 218 | exiting |
53536069 | 219 | .IP 0800 |
0ecf4440 | 220 | doing physical I/O (bio.c) |
53536069 | 221 | .IP 1000 |
3a8113b3 KM |
222 | process resulted from a |
223 | .IR vfork (2) | |
224 | which is not yet complete | |
53536069 | 225 | .IP 2000 |
3a8113b3 KM |
226 | another flag for |
227 | .IR vfork (2) | |
53536069 | 228 | .IP 4000 |
3a8113b3 KM |
229 | process has no virtual memory, as it is a parent in the context of |
230 | .IR vfork (2) | |
53536069 | 231 | .IP 8000 |
9eecf21c | 232 | process is demand paging data pages from its text vnode. |
0ecf4440 MK |
233 | .IP 10000 |
234 | process using sequential VM patterns | |
235 | .IP 20000 | |
236 | process using random VM patterns | |
237 | .IP 100000 | |
238 | using old 4.1-compatible signal semantics | |
239 | .IP 200000 | |
240 | process needs profiling tick | |
241 | .IP 400000 | |
242 | process is scanning descriptors during select | |
243 | .IP 1000000 | |
244 | process page tables have changed | |
3a8113b3 KM |
245 | .RE |
246 | .IP POIP | |
247 | number of pages currently being pushed out from this process. | |
248 | .IP PRI | |
249 | Scheduling priority, see | |
be3c220c | 250 | .IR setpriority (2). |
53536069 | 251 | .IP SIG |
3a8113b3 KM |
252 | Signals received (signals 1-32 coded in bits 0-31), |
253 | .IP UID | |
254 | Real user ID. | |
255 | .IP SLP | |
256 | Amount of time process has been blocked. | |
257 | .IP TIM | |
258 | Time resident in seconds; times over 127 coded as 127. | |
259 | .IP CPU | |
260 | Weighted integral of CPU time, for scheduler. | |
261 | .IP NI | |
262 | Nice level, | |
263 | see | |
be3c220c | 264 | .IR setpriority (2). |
3a8113b3 KM |
265 | .IP PID |
266 | The process ID number. | |
267 | .IP PPID | |
268 | The process ID of parent process. | |
269 | .IP ADDR | |
270 | If in core, the page frame number of the first page of the `u-area' of | |
271 | the process. | |
272 | If swapped out, the position in the swap area | |
273 | measured in multiples of 512 bytes. | |
274 | .IP RSS | |
275 | Resident set size \- the number of physical page frames allocated | |
276 | to this process. | |
277 | .IP SRSS | |
278 | RSS at last swap (0 if never swapped). | |
279 | .IP SIZE | |
280 | Virtual size of process image (data+stack) in multiples of 512 bytes. | |
281 | .IP WCHAN | |
282 | Wait channel number of a waiting process. | |
283 | .IP LINK | |
284 | Link pointer in list of runnable processes. | |
285 | .IP TEXTP | |
286 | If text is pure, pointer to location of text table entry. | |
3a8113b3 KM |
287 | .PD |
288 | .TP | |
289 | .B \-t | |
290 | Print table for terminals | |
291 | with these headings: | |
292 | .IP RAW | |
293 | Number of characters in raw input queue. | |
294 | .PD 0 | |
295 | .IP CAN | |
296 | Number of characters in canonicalized input queue. | |
297 | .IP OUT | |
298 | Number of characters in putput queue. | |
299 | .IP MODE | |
300 | See | |
301 | .IR tty (4). | |
302 | .IP ADDR | |
303 | Physical device address. | |
304 | .IP DEL | |
305 | Number of delimiters (newlines) in canonicalized input queue. | |
306 | .IP COL | |
307 | Calculated column position of terminal. | |
308 | .IP STATE | |
309 | Miscellaneous state variables encoded thus: | |
310 | .RS | |
53536069 JL |
311 | .IP T |
312 | delay timeout in progress | |
3a8113b3 KM |
313 | .IP W |
314 | waiting for open to complete | |
315 | .IP O | |
316 | open | |
53536069 JL |
317 | .IP F |
318 | outq has been flushed during DMA | |
3a8113b3 KM |
319 | .IP C |
320 | carrier is on | |
321 | .IP B | |
322 | busy doing output | |
323 | .IP A | |
324 | process is awaiting output | |
325 | .IP X | |
326 | open for exclusive use | |
53536069 JL |
327 | .IP S |
328 | output stopped | |
3a8113b3 KM |
329 | .IP H |
330 | hangup on close | |
331 | .RE | |
332 | .IP PGRP | |
333 | Process group for which this is controlling terminal. | |
334 | .IP DISC | |
335 | Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC | |
336 | or ``net'' for NETLDISC (see | |
337 | .IR bk (4)). | |
338 | .PD | |
339 | .TP | |
340 | .B \-u | |
341 | print information about a user process; | |
342 | the next argument is its address as given | |
343 | by | |
344 | .IR ps (1). | |
345 | The process must be in main memory, or the file used can | |
346 | be a core image and the address 0. | |
0ecf4440 MK |
347 | Only the fields located in the first page cluster can be located |
348 | succesfully if the process is in main memory. | |
3a8113b3 KM |
349 | .TP |
350 | .B \-f | |
351 | Print the open file table with these headings: | |
352 | .IP LOC | |
353 | The core location of this table entry. | |
be3c220c KM |
354 | .IP TYPE |
355 | The type of object the file table entry points to. | |
3a8113b3 KM |
356 | .PD 0 |
357 | .IP FLG | |
358 | Miscellaneous state variables encoded thus: | |
359 | .RS | |
360 | .IP R | |
361 | open for reading | |
362 | .IP W | |
363 | open for writing | |
be3c220c KM |
364 | .IP A |
365 | open for appending | |
53536069 JL |
366 | .IP S |
367 | shared lock present | |
368 | .IP X | |
369 | exclusive lock present | |
370 | .IP I | |
371 | signal pgrp when data ready | |
3a8113b3 KM |
372 | .RE |
373 | .IP CNT | |
374 | Number of processes that know this open file. | |
53536069 JL |
375 | .IP MSG |
376 | Number of messages outstanding for this file. | |
377 | .IP DATA | |
9eecf21c | 378 | The location of the vnode table entry or socket structure for this file. |
53536069 | 379 | .IP OFFSET |
be3c220c | 380 | The file offset (see |
53536069 | 381 | .IR lseek (2)). |
3a8113b3 KM |
382 | .PD |
383 | .PP | |
384 | .B \-s | |
385 | print information about swap space usage: the number of (1k byte) pages used | |
386 | and free is given as well as the number of used pages which belong | |
387 | to text images. | |
388 | .PP | |
389 | .B \-T | |
390 | prints the number of used and free slots in the several system tables | |
391 | and is useful for checking to see how full system tables have become if the | |
392 | system is under heavy load. | |
3a8113b3 KM |
393 | .SH FILES |
394 | .ta \w'/dev/kmem 'u | |
395 | /vmunix namelist | |
396 | .br | |
397 | /dev/kmem default source of tables | |
398 | .SH SEE ALSO | |
0ecf4440 | 399 | iostat(1), |
be3c220c | 400 | ps(1), |
0ecf4440 MK |
401 | systat(1), |
402 | vmstat(1), | |
be3c220c | 403 | stat(2), |
0ecf4440 | 404 | fs(5), |
3a8113b3 KM |
405 | .br |
406 | K. Thompson, | |
407 | .I UNIX Implementation | |
408 | .SH BUGS | |
409 | It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq | |
410 | on the tables reported by | |
411 | .B \-T; | |
412 | even more useful if these tables were dynamically allocated. |