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: src/usr.sbin/pstat/pstat.8,v 1.19.2.10 2002/07/12 09:12:49 des Exp $ 34.\" $DragonFly: src/usr.sbin/pstat/pstat.8,v 1.3 2006/02/17 19:40:21 swildner Exp $ 35.\" 36.Dd May 13, 1994 37.Dt PSTAT 8 38.Os 39.Sh NAME 40.Nm pstat , 41.Nm swapinfo 42.Nd display system data structures 43.Sh SYNOPSIS 44.Nm 45.Op Fl Tfknst 46.Op Fl M Ar core 47.Op Fl N Ar system 48.Pp 49.Nm swapinfo 50.Op Fl k 51.Op Fl M Ar core 52.Op Fl N Ar system 53.Sh DESCRIPTION 54.Nm Pstat 55displays 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 S 96shared lock present 97.It X 98exclusive lock present 99.It I 100signal pgrp when data ready 101.El 102.It CNT 103Number of processes that know this open file. 104.It MSG 105Number of messages outstanding for this file. 106.It DATA 107The location of the vnode table entry or socket structure for this file. 108.It OFFSET 109The file offset (see 110.Xr lseek 2 ) . 111.El 112.It Fl s 113Print information about swap space usage on all the 114swap areas compiled into the kernel. 115The first column is the device name of the partition. The next column is 116the total space available in the partition. The 117.Ar Used 118column indicates the total blocks used so far; the 119.Ar Available 120column indicates how much space is remaining on each partition. 121The 122.Ar Capacity 123reports the percentage of space used. 124.Pp 125If more than one partition is configured into the system, totals for all 126of the statistics will be reported in the final line of the report. 127.Pp 128If you supply the option again, as in 129.Fl ss , 130the system will display a breakdown of the swap bitmap/radix-tree. 131.It Fl t 132Print table for terminals 133with these headings: 134.Bl -tag -width indent 135.It RAW 136Number of characters in raw input queue. 137.It CAN 138Number of characters in canonicalized input queue. 139.It OUT 140Number of characters in output queue. 141.It MODE 142See 143.Xr tty 4 . 144.It ADDR 145Physical device address. 146.It DEL 147Number of delimiters (newlines) in canonicalized input queue. 148.It COL 149Calculated column position of terminal. 150.It STATE 151Miscellaneous state variables encoded thus: 152.Pp 153.Bl -tag -width indent -compact 154.It T 155delay timeout in progress 156.It W 157waiting for open to complete 158.It O 159open 160.It F 161outq has been flushed during DMA 162.It C 163carrier is on 164.It c 165connection open 166.It B 167busy doing output 168.It A 169process is waiting for space in output queue 170.It a 171process is waiting for output to complete 172.It X 173open for exclusive use 174.It S 175output stopped (ixon flow control) 176.It m 177output stopped (carrier flow control) 178.It o 179output stopped (CTS flow control) 180.It d 181output stopped (DSR flow control) 182.It K 183input stopped 184.It Y 185send SIGIO for input events 186.It D 187state for lowercase 188.Ql \e 189work 190.It E 191within a 192.Ql \e.../ 193for PRTRUB 194.It L 195next character is literal 196.It P 197retyping suspended input (PENDIN) 198.It N 199counting tab width, ignore FLUSHO 200.It l 201block mode input routine in use 202.It s 203i/o being snooped 204.It Z 205connection lost 206.El 207.It SESS 208Kernel address of the session structure. 209.It PGID 210Process group for which this is controlling terminal. 211.It DISC 212Line discipline; 213.Ql term 214for 215TTYDISC 216or 217.Ql ntty 218for 219NTTYDISC 220or 221.Ql tab 222for 223TABLDISC 224or 225.Ql slip 226for 227SLIPDISC 228or 229.Ql ppp 230for 231PPPDISC. 232.El 233.It Fl M 234Extract values associated with the name list from the specified core 235instead of the default 236.Pa /dev/kmem . 237.It Fl N 238Extract the name list from the specified system instead of the default 239.Pa /kernel . 240.El 241.Sh FILES 242.Bl -tag -width /dev/memxxx -compact 243.It Pa /kernel 244namelist 245.It Pa /dev/mem 246default source of tables 247.El 248.Sh SEE ALSO 249.Xr ps 1 , 250.Xr systat 1 , 251.Xr stat 2 , 252.Xr fs 5 , 253.Xr iostat 8 , 254.Xr vmstat 8 255.Rs 256.%T UNIX Implementation 257.%A K. Thompson 258.Re 259.Sh HISTORY 260The 261.Nm 262command appeared in 263.Bx 4.0 . 264.Sh BUGS 265Does not understand 266.Tn NFS 267swap servers. 268