]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/pstat/pstat.8
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.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 August 20, 2008
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 INQ
157 Number of characters that can be stored in the input queue.
158 .It CAN
159 Number of characters in the input queue which can be read.
160 .It LIN
161 Number of characters in the input queue which cannot be read yet.
162 .It LOW
163 Low water mark for input.
164 .It OUTQ
165 Number of characters that can be stored in the output queue.
166 .It USE
167 Number of bytes in the output queue.
168 .It LOW
169 Low water mark for output.
170 .It COL
171 Calculated column position of terminal.
172 .It SESS
173 Kernel address of the session structure.
174 .It PGID
175 Process group for which this is the controlling terminal.
176 .It STATE
177 Miscellaneous state variables encoded thus:
178 .Pp
179 .Bl -tag -width indent -compact
180 .It I
181 init/lock-state device nodes present
182 .It C
183 callout device nodes present
184 .It O
185 opened
186 .It c
187 console in use
188 .It G
189 gone
190 .It B
191 busy in
192 .Xr open 2
193 .It Y
194 send SIGIO for input events
195 .It L
196 next character is literal
197 .It H
198 high watermark reached
199 .It X
200 open for exclusive use
201 .It S
202 output stopped (ixon flow control)
203 .It l
204 block mode input routine in use
205 .It Z
206 connection lost
207 .It s
208 i/o being snooped
209 .It b
210 busy in
211 .Xr read 2
212 or
213 .Xr write 2
214 .El
215 .Pp
216 The
217 .Ql i
218 and
219 .Ql o
220 characters refer to the previous character, to differentiate between
221 input and output.
222 .El
223 .It Fl M
224 Extract values associated with the name list from the specified core.
225 .It Fl N
226 If
227 .Fl M
228 is also specified,
229 extract the name list from the specified system instead of the default,
230 which is the kernel image the system has booted from.
231 .El
232 .Sh SEE ALSO
233 .Xr ps 1 ,
234 .Xr systat 1 ,
235 .Xr stat 2 ,
236 .Xr fs 5 ,
237 .Xr iostat 8 ,
238 .Xr vmstat 8
239 .Rs
240 .%T UNIX Implementation
241 .%A K. Thompson
242 .Re
243 .Sh HISTORY
244 The
245 .Nm
246 utility appeared in
247 .Bx 4.0 .
248 .Sh BUGS
249 Does not understand
250 .Tn NFS
251 swap servers.