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 | .\" | |
5 | .\" @(#)pstat.8 4.1 (Berkeley) %G% | |
6 | .\" | |
7 | .TH PSTAT 8 4/1/81 | |
8 | .UC 4 | |
9 | .SH NAME | |
10 | pstat \- print system facts | |
11 | .SH SYNOPSIS | |
12 | .B /etc/pstat | |
13 | [ | |
14 | .B \-aixptufT | |
15 | ] [ suboptions ] | |
16 | [ file ] | |
17 | .SH DESCRIPTION | |
18 | .I Pstat | |
19 | interprets the contents of certain system tables. | |
20 | If | |
21 | .I file | |
22 | is given, the tables are sought there, otherwise | |
23 | in | |
24 | .I /dev/kmem. | |
25 | The required namelist is taken from | |
26 | .I /vmunix. | |
27 | Options are | |
28 | .TP \w'WCHAN\ 'u | |
29 | .B \-a | |
30 | Under | |
31 | .BR \-p , | |
32 | describe all process slots rather than just active ones. | |
33 | .TP | |
34 | .B \-i | |
35 | Print the inode table with the these headings: | |
36 | .IP LOC | |
37 | The core location of this table entry. | |
38 | .PD 0 | |
39 | .IP FLAGS | |
40 | Miscellaneous state variables encoded thus: | |
41 | .RS | |
42 | .IP L | |
43 | locked | |
44 | .IP U | |
45 | update time | |
46 | .IR (filsys (5)) | |
47 | must be corrected | |
48 | .IP A | |
49 | access time must be corrected | |
50 | .IP M | |
51 | file system is mounted here | |
52 | .IP W | |
53 | wanted by another process (L flag is on) | |
54 | .IP T | |
55 | contains a text file | |
56 | .IP C | |
57 | changed time must be corrected | |
58 | .RE | |
59 | .IP CNT | |
60 | Number of open file table entries for this inode. | |
61 | .IP DEV | |
62 | Major and minor device number of file system in which | |
63 | this inode resides. | |
64 | .IP INO | |
65 | I-number within the device. | |
66 | .IP MODE | |
67 | Mode bits, see | |
68 | .IR chmod (2). | |
69 | .IP NLK | |
70 | Number of links to this inode. | |
71 | .IP UID | |
72 | User ID of owner. | |
73 | .IP SIZ/DEV | |
74 | Number of bytes in an ordinary file, or | |
75 | major and minor device of special file. | |
76 | .PD | |
77 | .TP | |
78 | .B \-x | |
79 | Print the text table with these headings: | |
80 | .IP LOC | |
81 | The core location of this table entry. | |
82 | .PD 0 | |
83 | .IP FLAGS | |
84 | Miscellaneous state variables encoded thus: | |
85 | .RS | |
86 | .IP T | |
87 | .IR ptrace (2) | |
88 | in effect | |
89 | .IP W | |
90 | text not yet written on swap device | |
91 | .IP L | |
92 | loading in progress | |
93 | .IP K | |
94 | locked | |
95 | .IP w | |
96 | wanted (L flag is on) | |
97 | .IP P | |
98 | resulted from demand-page-from-inode exec format (see | |
99 | .IR exec (2)) | |
100 | .RE | |
101 | .PD | |
102 | .IP DADDR | |
103 | Disk address in swap, measured in multiples of 512 bytes. | |
104 | .IP CADDR | |
105 | Head of a linked list of loaded processes using this text segment. | |
106 | .IP SIZE | |
107 | Size of text segment, measured in multiples of 512 bytes. | |
108 | .IP IPTR | |
109 | Core location of corresponding inode. | |
110 | .IP CNT | |
111 | Number of processes using this text segment. | |
112 | .IP CCNT | |
113 | Number of processes in core using this text segment. | |
114 | .PD | |
115 | .TP | |
116 | .B \-p | |
117 | Print process table for active processes with these headings: | |
118 | .IP LOC | |
119 | The core location of this table entry. | |
120 | .PD 0 | |
121 | .IP S | |
122 | Run state encoded thus: | |
123 | .RS | |
124 | .IP 0 | |
125 | no process | |
126 | .IP 1 | |
127 | waiting for some event | |
128 | .IP 3 | |
129 | runnable | |
130 | .IP 4 | |
131 | being created | |
132 | .IP 5 | |
133 | being terminated | |
134 | .IP 6 | |
135 | stopped under trace | |
136 | .RE | |
137 | .IP F | |
138 | Miscellaneous state variables, or-ed together (hexadecimal): | |
139 | .RS | |
140 | .IP 000001 9n | |
141 | loaded | |
142 | .IP 000002 | |
143 | the scheduler process | |
144 | .IP 000004 | |
145 | locked for swap out | |
146 | .IP 000008 | |
147 | swapped out | |
148 | .IP 000010 | |
149 | traced | |
150 | .IP 000020 | |
151 | used in tracing | |
152 | .IP 000040 | |
153 | locked in by | |
154 | .IR lock (2). | |
155 | .IP 000080 | |
156 | in page-wait | |
157 | .IP 000100 | |
158 | prevented from swapping during | |
159 | .IR fork (2) | |
160 | .IP 000200 | |
161 | gathering pages for raw i/o | |
162 | .IP 000400 | |
163 | exiting | |
164 | .IP 001000 | |
165 | process resulted from a | |
166 | .IR vfork (2) | |
167 | which is not yet complete | |
168 | .IP 002000 | |
169 | another flag for | |
170 | .IR vfork (2) | |
171 | .IP 004000 | |
172 | process has no virtual memory, as it is a parent in the context of | |
173 | .IR vfork (2) | |
174 | .IP 008000 | |
175 | process is demand paging data pages from its text inode. | |
176 | .IP 010000 | |
177 | process has advised of anomalous behavior with | |
178 | .IR vadvise (2). | |
179 | .IP 020000 | |
180 | process has advised of sequential behavior with | |
181 | .IR vadvise (2). | |
182 | .IP 040000 | |
183 | process is in a sleep which will timeout. | |
184 | .IP 080000 | |
185 | a parent of this process has exited and this process | |
186 | is now considered detached. | |
187 | .IP 100000 | |
188 | process used some new signal primitives, i.e. | |
189 | .IR sigset (3); | |
190 | more system calls will restart. | |
191 | .IP 200000 | |
192 | process is owed a profiling tick. | |
193 | .RE | |
194 | .IP POIP | |
195 | number of pages currently being pushed out from this process. | |
196 | .IP PRI | |
197 | Scheduling priority, see | |
198 | .IR nice (2). | |
199 | .IP SIGNAL | |
200 | Signals received (signals 1-32 coded in bits 0-31), | |
201 | .IP UID | |
202 | Real user ID. | |
203 | .IP SLP | |
204 | Amount of time process has been blocked. | |
205 | .IP TIM | |
206 | Time resident in seconds; times over 127 coded as 127. | |
207 | .IP CPU | |
208 | Weighted integral of CPU time, for scheduler. | |
209 | .IP NI | |
210 | Nice level, | |
211 | see | |
212 | .IR nice (2). | |
213 | .IP PGRP | |
214 | Process number of root of process group | |
215 | (the opener of the controlling terminal). | |
216 | .IP PID | |
217 | The process ID number. | |
218 | .IP PPID | |
219 | The process ID of parent process. | |
220 | .IP ADDR | |
221 | If in core, the page frame number of the first page of the `u-area' of | |
222 | the process. | |
223 | If swapped out, the position in the swap area | |
224 | measured in multiples of 512 bytes. | |
225 | .IP RSS | |
226 | Resident set size \- the number of physical page frames allocated | |
227 | to this process. | |
228 | .IP SRSS | |
229 | RSS at last swap (0 if never swapped). | |
230 | .IP SIZE | |
231 | Virtual size of process image (data+stack) in multiples of 512 bytes. | |
232 | .IP WCHAN | |
233 | Wait channel number of a waiting process. | |
234 | .IP LINK | |
235 | Link pointer in list of runnable processes. | |
236 | .IP TEXTP | |
237 | If text is pure, pointer to location of text table entry. | |
238 | .IP CLKT | |
239 | Countdown for | |
240 | .IR alarm (2) | |
241 | measured in seconds. | |
242 | .PD | |
243 | .TP | |
244 | .B \-t | |
245 | Print table for terminals | |
246 | with these headings: | |
247 | .IP RAW | |
248 | Number of characters in raw input queue. | |
249 | .PD 0 | |
250 | .IP CAN | |
251 | Number of characters in canonicalized input queue. | |
252 | .IP OUT | |
253 | Number of characters in putput queue. | |
254 | .IP MODE | |
255 | See | |
256 | .IR tty (4). | |
257 | .IP ADDR | |
258 | Physical device address. | |
259 | .IP DEL | |
260 | Number of delimiters (newlines) in canonicalized input queue. | |
261 | .IP COL | |
262 | Calculated column position of terminal. | |
263 | .IP STATE | |
264 | Miscellaneous state variables encoded thus: | |
265 | .RS | |
266 | .IP W | |
267 | waiting for open to complete | |
268 | .IP O | |
269 | open | |
270 | .IP S | |
271 | has special (output) start routine | |
272 | .IP C | |
273 | carrier is on | |
274 | .IP B | |
275 | busy doing output | |
276 | .IP A | |
277 | process is awaiting output | |
278 | .IP X | |
279 | open for exclusive use | |
280 | .IP H | |
281 | hangup on close | |
282 | .RE | |
283 | .IP PGRP | |
284 | Process group for which this is controlling terminal. | |
285 | .IP DISC | |
286 | Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC | |
287 | or ``net'' for NETLDISC (see | |
288 | .IR bk (4)). | |
289 | .PD | |
290 | .TP | |
291 | .B \-u | |
292 | print information about a user process; | |
293 | the next argument is its address as given | |
294 | by | |
295 | .IR ps (1). | |
296 | The process must be in main memory, or the file used can | |
297 | be a core image and the address 0. | |
298 | .TP | |
299 | .B \-f | |
300 | Print the open file table with these headings: | |
301 | .IP LOC | |
302 | The core location of this table entry. | |
303 | .PD 0 | |
304 | .IP FLG | |
305 | Miscellaneous state variables encoded thus: | |
306 | .RS | |
307 | .IP R | |
308 | open for reading | |
309 | .IP W | |
310 | open for writing | |
311 | .IP P | |
312 | pipe | |
313 | .RE | |
314 | .IP CNT | |
315 | Number of processes that know this open file. | |
316 | .IP INO | |
317 | The location of the inode table entry for this file. | |
318 | .IP OFFS | |
319 | The file offset, see | |
320 | .IR lseek (2). | |
321 | .PD | |
322 | .PP | |
323 | .B \-s | |
324 | print information about swap space usage: the number of (1k byte) pages used | |
325 | and free is given as well as the number of used pages which belong | |
326 | to text images. | |
327 | .PP | |
328 | .B \-T | |
329 | prints the number of used and free slots in the several system tables | |
330 | and is useful for checking to see how full system tables have become if the | |
331 | system is under heavy load. | |
332 | .B \-m | |
333 | and | |
334 | .B \-g | |
335 | flags print the multiplexor tables. These tables are rather difficult to | |
336 | explain. The potential explorer should examine the multiplexor code in | |
337 | the system. | |
338 | .SH FILES | |
339 | .ta \w'/dev/kmem 'u | |
340 | /vmunix namelist | |
341 | .br | |
342 | /dev/kmem default source of tables | |
343 | .SH SEE ALSO | |
344 | ps(1), stat(2), filsys(5) | |
345 | .br | |
346 | K. Thompson, | |
347 | .I UNIX Implementation | |
348 | .SH BUGS | |
349 | It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq | |
350 | on the tables reported by | |
351 | .B \-T; | |
352 | even more useful if these tables were dynamically allocated. |