xref: /freebsd/usr.sbin/pstat/pstat.8 (revision 490d5836b5ab0c76675986696b1637fff97dfae2)
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$
34.\"
35.Dd May 23, 2002
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
53The
54.Nm
55utility displays open file entry, swap space utilization,
56terminal state, and vnode data structures.
57.Pp
58If invoked as
59.Nm swapinfo
60the
61.Fl s
62option is implied, and only the
63.Fl k
64option is legal.
65.Pp
66The following options are available:
67.Bl -tag -width indent
68.It Fl n
69Print devices out by major/minor instead of name.
70.It Fl k
71Print sizes in kilobytes, regardless of the setting of the
72.Ev BLOCKSIZE
73environment variable.
74.It Fl T
75Print the number of used and free slots in several system tables.
76This is useful for checking to see how large system tables have become
77if the system is under heavy load.
78.It Fl f
79Print the open file table with these headings:
80.Bl -tag -width indent
81.It LOC
82The core location of this table entry.
83.It TYPE
84The type of object the file table entry points to.
85.It FLG
86Miscellaneous state variables encoded thus:
87.Pp
88.Bl -tag -width indent -compact
89.It R
90open for reading
91.It W
92open for writing
93.It A
94open for appending
95.It I
96signal pgrp when data ready
97.El
98.It CNT
99Number of processes that know this open file.
100.It MSG
101Number of messages outstanding for this file.
102.It DATA
103The location of the vnode table entry or socket structure for this file.
104.It OFFSET
105The file offset (see
106.Xr lseek 2 ) .
107.El
108.It Fl s
109Print information about swap space usage on all the
110swap areas compiled into the kernel.
111The first column is the device name of the partition.  The next column is
112the total space available in the partition.  The
113.Ar Used
114column indicates the total blocks used so far;  the
115.Ar Available
116column indicates how much space is remaining on each partition.
117The
118.Ar Capacity
119reports the percentage of space used.
120.Pp
121If more than one partition is configured into the system, totals for all
122of the statistics will be reported in the final line of the report.
123.Pp
124If you supply the option again, as in
125.Fl ss ,
126the system will display a breakdown of the swap bitmap/radix-tree.
127.It Fl t
128Print table for terminals
129with these headings:
130.Bl -tag -width indent
131.It RAW
132Number of characters in raw input queue.
133.It CAN
134Number of characters in canonicalized input queue.
135.It OUT
136Number of characters in output queue.
137.It MODE
138See
139.Xr tty 4 .
140.It ADDR
141Physical device address.
142.It DEL
143Number of delimiters (newlines) in canonicalized input queue.
144.It COL
145Calculated column position of terminal.
146.It STATE
147Miscellaneous state variables encoded thus:
148.Pp
149.Bl -tag -width indent -compact
150.It T
151delay timeout in progress
152.It W
153waiting for open to complete
154.It O
155open
156.It F
157outq has been flushed during DMA
158.It C
159carrier is on
160.It c
161connection open
162.It B
163busy doing output
164.It A
165process is waiting for space in output queue
166.It a
167process is waiting for output to complete
168.It X
169open for exclusive use
170.It S
171output stopped (ixon flow control)
172.It m
173output stopped (carrier flow control)
174.It o
175output stopped (CTS flow control)
176.It d
177output stopped (DSR flow control)
178.It K
179input stopped
180.It Y
181send SIGIO for input events
182.It D
183state for lowercase
184.Ql \e
185work
186.It E
187within a
188.Ql \e.../
189for PRTRUB
190.It L
191next character is literal
192.It P
193retyping suspended input (PENDIN)
194.It N
195counting tab width, ignore FLUSHO
196.It l
197block mode input routine in use
198.It s
199i/o being snooped
200.It Z
201connection lost
202.El
203.It SESS
204Kernel address of the session structure.
205.It PGID
206Process group for which this is controlling terminal.
207.It DISC
208Line discipline;
209.Ql term
210for
211TTYDISC
212or
213.Ql ntty
214for
215NTTYDISC
216or
217.Ql tab
218for
219TABLDISC
220or
221.Ql slip
222for
223SLIPDISC
224or
225.Ql ppp
226for
227PPPDISC.
228.El
229.It Fl M
230Extract values associated with the name list from the specified core
231instead of the default
232.Pa /dev/kmem .
233.It Fl N
234Extract the name list from the specified system instead of the default
235.Pa /boot/kernel/kernel .
236.El
237.Sh FILES
238.Bl -tag -width /boot/kernel/kernel -compact
239.It Pa /boot/kernel/kernel
240namelist
241.It Pa /dev/mem
242default source of tables
243.El
244.Sh SEE ALSO
245.Xr ps 1 ,
246.Xr systat 1 ,
247.Xr stat 2 ,
248.Xr fs 5 ,
249.Xr iostat 8 ,
250.Xr vmstat 8
251.Rs
252.%T UNIX Implementation
253.%A K. Thompson
254.Re
255.Sh BUGS
256Does not understand
257.Tn NFS
258swap servers.
259.Sh HISTORY
260The
261.Nm
262utility appeared in
263.Bx 4.0 .
264