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.\" 3. All advertising materials mentioning features or use of this software 20.\" must display the following acknowledgement: 21.\" This product includes software developed by the University of 22.\" California, Berkeley and its contributors. 23.\" 4. Neither the name of the University nor the names of its contributors 24.\" may be used to endorse or promote products derived from this software 25.\" without specific prior written permission. 26.\" 27.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 28.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 31.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 33.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37.\" SUCH DAMAGE. 38.\" 39.\" @(#)pstat.8 8.5 (Berkeley) 5/13/94 40.\" $FreeBSD$ 41.\" 42.Dd May 23, 2002 43.Dt PSTAT 8 44.Os 45.Sh NAME 46.Nm pstat , 47.Nm swapinfo 48.Nd display system data structures 49.Sh SYNOPSIS 50.Nm 51.Op Fl Tfknst 52.Op Fl M Ar core Op Fl N Ar system 53.Nm swapinfo 54.Op Fl k 55.Op Fl M Ar core Op Fl N Ar system 56.Sh DESCRIPTION 57The 58.Nm 59utility displays open file entry, swap space utilization, 60terminal state, and vnode data structures. 61.Pp 62If invoked as 63.Nm swapinfo 64the 65.Fl s 66option is implied, and only the 67.Fl k 68option is legal. 69.Pp 70If the 71.Fl M 72option is not specified, information is obtained from 73the currently running kernel via the 74.Xr sysctl 3 75interface. 76Otherwise, information is read from the specified core file, 77using the name list from the specified kernel image (or from 78the default image). 79.Pp 80The following options are available: 81.Bl -tag -width indent 82.It Fl n 83Print devices out by major/minor instead of name. 84.It Fl k 85Print sizes in kilobytes, regardless of the setting of the 86.Ev BLOCKSIZE 87environment variable. 88.It Fl T 89Print the number of used and free slots in several system tables. 90This is useful for checking to see how large system tables have become 91if the system is under heavy load. 92.It Fl f 93Print the open file table with these headings: 94.Bl -tag -width indent 95.It LOC 96The core location of this table entry. 97.It TYPE 98The type of object the file table entry points to. 99.It FLG 100Miscellaneous state variables encoded thus: 101.Pp 102.Bl -tag -width indent -compact 103.It R 104open for reading 105.It W 106open for writing 107.It A 108open for appending 109.It I 110signal pgrp when data ready 111.El 112.It CNT 113Number of processes that know this open file. 114.It MSG 115Number of messages outstanding for this file. 116.It DATA 117The location of the vnode table entry or socket structure for this file. 118.It OFFSET 119The file offset (see 120.Xr lseek 2 ) . 121.El 122.It Fl s 123Print information about swap space usage on all the 124swap areas compiled into the kernel. 125The first column is the device name of the partition. 126The next column is 127the total space available in the partition. 128The 129.Ar Used 130column indicates the total blocks used so far; the 131.Ar Available 132column indicates how much space is remaining on each partition. 133The 134.Ar Capacity 135reports the percentage of space used. 136.Pp 137If more than one partition is configured into the system, totals for all 138of the statistics will be reported in the final line of the report. 139.It Fl t 140Print table for terminals 141with these headings: 142.Bl -tag -width indent 143.It RAW 144Number of characters in raw input queue. 145.It CAN 146Number of characters in canonicalized input queue. 147.It OUT 148Number of characters in output queue. 149.It MODE 150See 151.Xr tty 4 . 152.It ADDR 153Physical device address. 154.It DEL 155Number of delimiters (newlines) in canonicalized input queue. 156.It COL 157Calculated column position of terminal. 158.It STATE 159Miscellaneous state variables encoded thus: 160.Pp 161.Bl -tag -width indent -compact 162.It T 163delay timeout in progress 164.It W 165waiting for open to complete 166.It O 167open 168.It F 169outq has been flushed during DMA 170.It C 171carrier is on 172.It c 173connection open 174.It B 175busy doing output 176.It A 177process is waiting for space in output queue 178.It a 179process is waiting for output to complete 180.It X 181open for exclusive use 182.It S 183output stopped (ixon flow control) 184.It m 185output stopped (carrier flow control) 186.It o 187output stopped (CTS flow control) 188.It d 189output stopped (DSR flow control) 190.It K 191input stopped 192.It Y 193send SIGIO for input events 194.It D 195state for lowercase 196.Ql \e 197work 198.It E 199within a 200.Ql \e.../ 201for PRTRUB 202.It L 203next character is literal 204.It P 205retyping suspended input (PENDIN) 206.It N 207counting tab width, ignore FLUSHO 208.It l 209block mode input routine in use 210.It s 211i/o being snooped 212.It Z 213connection lost 214.El 215.It SESS 216Kernel address of the session structure. 217.It PGID 218Process group for which this is controlling terminal. 219.It DISC 220Line discipline; 221.Ql term 222for 223TTYDISC 224or 225.Ql ntty 226for 227NTTYDISC 228or 229.Ql tab 230for 231TABLDISC 232or 233.Ql slip 234for 235SLIPDISC 236or 237.Ql ppp 238for 239PPPDISC. 240.El 241.It Fl M 242Extract values associated with the name list from the specified core. 243.It Fl N 244If 245.Fl M 246is also specified, 247extract the name list from the specified system instead of the default, 248which is the kernel image the system has booted from. 249.El 250.Sh SEE ALSO 251.Xr ps 1 , 252.Xr systat 1 , 253.Xr stat 2 , 254.Xr fs 5 , 255.Xr iostat 8 , 256.Xr vmstat 8 257.Rs 258.%T UNIX Implementation 259.%A K. Thompson 260.Re 261.Sh BUGS 262Does not understand 263.Tn NFS 264swap servers. 265.Sh HISTORY 266The 267.Nm 268utility appeared in 269.Bx 4.0 . 270