1 .\" $NetBSD: pstat.8,v 1.38 2009/10/14 22:59:11 joerg Exp $
3 .\" Copyright (c) 1980, 1991, 1993, 1994
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" from: @(#)pstat.8 8.5 (Berkeley) 5/13/94
37 .Nd display system data structures
49 displays open file entry, swap space utilization,
50 terminal state, and vnode data structures.
53 is given, the information is sought there, otherwise
56 The required namelist is taken from
62 The following options are available:
65 Prints the number of used and free slots for open files, used vnodes, and swap
67 This option is useful for checking to see how large system tables
68 become if the system is under heavy load.
70 Print the open file table with these headings:
71 .Bl -tag -width indent
73 The core location of this table entry.
75 The type of object the file table entry points to.
77 Miscellaneous state variables encoded thus:
79 .Bl -tag -width indent -compact
89 exclusive lock present
91 signal pgrp when data ready
94 Number of processes that know this open file.
96 Number of messages outstanding for this file.
98 The location of the vnode table entry or socket structure for this file.
100 Number of active users of this open file.
102 Value of internal flags.
110 option uses (1024 * 1024 * 1024) byte blocks instead of the default 512 byte.
113 .Xr humanize_number 3
114 to display (swap) sizes.
120 option uses (1024 * 1024) byte blocks instead of the default 512 byte.
122 Print devices by major/minor number rather than by name.
124 Print information about swap space usage on all the
125 swap areas compiled into the kernel.
126 The first column is the device name of the partition.
127 The next column is the total space available in the partition.
130 column indicates the total blocks used so far; the
132 column indicates how much space is remaining on each partition.
135 reports the percentage of space used.
137 If more than one partition is configured into the system, totals for all
138 of the statistics will be reported in the final line of the report.
140 Print table for terminals
142 .Bl -tag -width indent
144 Physical device name.
146 Number of characters in raw input queue.
148 Number of characters in canonicalized input queue.
150 Number of characters in output queue.
152 High water mark for output.
154 Low water mark for output.
156 Calculated column position of terminal.
158 Miscellaneous state variables encoded thus:
160 .Bl -tag -width indent -compact
162 delay timeout in progress
164 .\" waiting for open to complete
168 outq has been flushed during DMA
174 process is awaiting output
176 open for exclusive use
180 further input blocked
182 tty in async I/O mode
192 next character is literal
194 retyping suspended input
197 counting tab width, ignore FLUSHO
202 Session for which this is controlling terminal.
204 Current foreground process group associated with this terminal.
227 Print the active vnodes.
228 Each group of vnodes corresponding to a particular filesystem is preceded
229 by a two line header.
230 The first line consists of the following:
232 .No *** MOUNT Em fstype from Li on Em on fsflags
237 .Em adosfs , afs , cd9660 , fdesc ,
238 .Em ffs , ext2fs , kernfs , lfs , lofs ,
239 .Em mfs , msdos , nfs , null ,
240 .Em procfs , umap , union ;
242 is the filesystem mounted from;
245 the filesystem is mounted on; and
248 of optional flags applied to the mount (see
250 The second line is a header for the individual fields,
251 the first part of which are fixed, and the second part are filesystem
253 The headers common to all vnodes are:
254 .Bl -tag -width indent
256 Location of this vnode.
260 A list of letters representing vnode flags:
262 .Bl -tag -width indent -compact
264 VROOT root of its file system.
266 VTEXT pure text prototype.
268 VSYSTEM vnode being used by kernel.
270 VISTTY vnode is a tty.
272 VEXECMAP vnode has PROT_EXEC mappings.
274 VXLOCK locked to change underlying type.
276 VXWANT process is waiting for vnode.
278 VBWAIT waiting for output to complete.
280 VALIASED vnode has an alias.
282 VDIROP lfs vnode involved in directory op.
284 VLAYER vnode is on layer filesystem.
286 VONWORKLST vnode is on syncer work-list.
290 The number of references to this vnode.
292 The number of I/O buffers held by this vnode.
294 The type of underlying data.
296 The number of pages in this vnode.
303 this is the inode number.
305 Miscellaneous filesystem specific state variables encoded thus:
306 .Bl -tag -width indent
307 .It "For ffs, lfs or ext2fs:"
308 .Bl -tag -width indent -compact
310 access time must be corrected
312 changed time must be corrected
318 contains modifications
322 has a rename in progress
326 exclusive lock applied
328 is being cleaned (LFS)
330 directory operation in progress (LFS)
332 blocks to be freed in free count
335 .Bl -tag -width indent -compact
337 waiting for I/O buffer flush to complete
339 I/O buffers being flushed
341 locally modified data exists
343 an earlier write failed
345 special file accessed
349 special file times changed
353 Number of bytes in an ordinary file, or
354 major and minor device of special file.
358 .Bl -tag -width BLOCKSIZE
360 If the environment variable
364 option is not specified, the block counts will be displayed in units of that
368 .Bl -tag -width /dev/kmemxxx -compact
372 default source of tables
382 .%T Tn UNIX Implementation
391 Swap statistics are reported for all swap partitions compiled into the kernel,
392 regardless of whether those partitions are being used.
394 Does not understand NFS swap servers.