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