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