Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / pstat / pstat.8
1 .\" Copyright (c) 1980, 1991, 1993, 1994
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)pstat.8     8.5 (Berkeley) 5/13/94
33 .\" $FreeBSD: src/usr.sbin/pstat/pstat.8,v 1.19.2.10 2002/07/12 09:12:49 des Exp $
34 .\"
35 .Dd May 13, 1994
36 .Dt PSTAT 8
37 .Os
38 .Sh NAME
39 .Nm pstat ,
40 .Nm swapinfo
41 .Nd display system data structures
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl Tfknst
45 .Op Fl M Ar core
46 .Op Fl N Ar system
47 .Pp
48 .Nm swapinfo
49 .Op Fl k
50 .Op Fl M Ar core
51 .Op Fl N Ar system
52 .Sh DESCRIPTION
53 .Nm Pstat
54 displays open file entry, swap space utilization,
55 terminal state, and vnode data structures.
56 .Pp
57 If invoked as
58 .Nm swapinfo
59 the
60 .Fl s
61 option is implied, and only the
62 .Fl k
63 option is legal.
64 .Pp
65 The following options are available:
66 .Bl -tag -width indent
67 .It Fl n
68 Print devices out by major/minor instead of name.
69 .It Fl k
70 Print sizes in kilobytes, regardless of the setting of the
71 .Ev BLOCKSIZE
72 environment variable.
73 .It Fl T
74 Print the number of used and free slots in several system tables.
75 This is useful for checking to see how large system tables have become
76 if the system is under heavy load.
77 .It Fl f
78 Print the open file table with these headings:
79 .Bl -tag -width indent
80 .It LOC
81 The core location of this table entry.
82 .It TYPE
83 The type of object the file table entry points to.
84 .It FLG
85 Miscellaneous state variables encoded thus:
86 .Pp
87 .Bl -tag -width indent -compact
88 .It R
89 open for reading
90 .It W
91 open for writing
92 .It A
93 open for appending
94 .It S
95 shared lock present
96 .It X
97 exclusive lock present
98 .It I
99 signal pgrp when data ready
100 .El
101 .It CNT
102 Number of processes that know this open file.
103 .It MSG
104 Number of messages outstanding for this file.
105 .It DATA
106 The location of the vnode table entry or socket structure for this file.
107 .It OFFSET
108 The file offset (see
109 .Xr lseek 2 ) .
110 .El
111 .It Fl s
112 Print information about swap space usage on all the
113 swap areas compiled into the kernel.
114 The first column is the device name of the partition.  The next column is
115 the total space available in the partition.  The
116 .Ar Used
117 column indicates the total blocks used so far;  the
118 .Ar Available
119 column indicates how much space is remaining on each partition.
120 The
121 .Ar Capacity
122 reports the percentage of space used.
123 .Pp
124 If more than one partition is configured into the system, totals for all
125 of the statistics will be reported in the final line of the report.
126 .Pp
127 If you supply the option again, as in
128 .Fl ss ,
129 the system will display a breakdown of the swap bitmap/radix-tree.
130 .It Fl t
131 Print table for terminals
132 with these headings:
133 .Bl -tag -width indent
134 .It RAW
135 Number of characters in raw input queue.
136 .It CAN
137 Number of characters in canonicalized input queue.
138 .It OUT
139 Number of characters in output queue.
140 .It MODE
141 See
142 .Xr tty 4 .
143 .It ADDR
144 Physical device address.
145 .It DEL
146 Number of delimiters (newlines) in canonicalized input queue.
147 .It COL
148 Calculated column position of terminal.
149 .It STATE
150 Miscellaneous state variables encoded thus:
151 .Pp
152 .Bl -tag -width indent -compact
153 .It T
154 delay timeout in progress
155 .It W
156 waiting for open to complete
157 .It O
158 open
159 .It F
160 outq has been flushed during DMA
161 .It C
162 carrier is on
163 .It c
164 connection open
165 .It B
166 busy doing output
167 .It A
168 process is waiting for space in output queue
169 .It a
170 process is waiting for output to complete
171 .It X
172 open for exclusive use
173 .It S
174 output stopped (ixon flow control)
175 .It m
176 output stopped (carrier flow control)
177 .It o
178 output stopped (CTS flow control)
179 .It d
180 output stopped (DSR flow control)
181 .It K
182 input stopped
183 .It Y
184 send SIGIO for input events
185 .It D
186 state for lowercase
187 .Ql \e
188 work
189 .It E
190 within a
191 .Ql \e.../
192 for PRTRUB
193 .It L
194 next character is literal
195 .It P
196 retyping suspended input (PENDIN)
197 .It N
198 counting tab width, ignore FLUSHO
199 .It l
200 block mode input routine in use
201 .It s
202 i/o being snooped
203 .It Z
204 connection lost
205 .El
206 .It SESS
207 Kernel address of the session structure.
208 .It PGID
209 Process group for which this is controlling terminal.
210 .It DISC
211 Line discipline;
212 .Ql term
213 for
214 TTYDISC
215 or
216 .Ql ntty
217 for
218 NTTYDISC
219 or
220 .Ql tab
221 for
222 TABLDISC
223 or
224 .Ql slip
225 for
226 SLIPDISC
227 or
228 .Ql ppp
229 for
230 PPPDISC.
231 .El
232 .It Fl M
233 Extract values associated with the name list from the specified core
234 instead of the default
235 .Pa /dev/kmem .
236 .It Fl N
237 Extract the name list from the specified system instead of the default
238 .Pa /kernel .
239 .El
240 .Sh FILES
241 .Bl -tag -width /dev/memxxx -compact
242 .It Pa /kernel
243 namelist
244 .It Pa /dev/mem
245 default source of tables
246 .El
247 .Sh SEE ALSO
248 .Xr ps 1 ,
249 .Xr systat 1 ,
250 .Xr stat 2 ,
251 .Xr fs 5 ,
252 .Xr iostat 8 ,
253 .Xr vmstat 8
254 .Rs
255 .%T UNIX Implementation
256 .%A K. Thompson
257 .Re
258 .Sh BUGS
259 Does not understand
260 .Tn NFS
261 swap servers.
262 .Sh HISTORY
263 The
264 .Nm
265 command appeared in
266 .Bx 4.0 .