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