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