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. The next column is 126the total space available in the partition. The 127.Ar Used 128column indicates the total blocks used so far; the 129.Ar Available 130column indicates how much space is remaining on each partition. 131The 132.Ar Capacity 133reports the percentage of space used. 134.Pp 135If more than one partition is configured into the system, totals for all 136of the statistics will be reported in the final line of the report. 137.It Fl t 138Print table for terminals 139with these headings: 140.Bl -tag -width indent 141.It RAW 142Number of characters in raw input queue. 143.It CAN 144Number of characters in canonicalized input queue. 145.It OUT 146Number of characters in output queue. 147.It MODE 148See 149.Xr tty 4 . 150.It ADDR 151Physical device address. 152.It DEL 153Number of delimiters (newlines) in canonicalized input queue. 154.It COL 155Calculated column position of terminal. 156.It STATE 157Miscellaneous state variables encoded thus: 158.Pp 159.Bl -tag -width indent -compact 160.It T 161delay timeout in progress 162.It W 163waiting for open to complete 164.It O 165open 166.It F 167outq has been flushed during DMA 168.It C 169carrier is on 170.It c 171connection open 172.It B 173busy doing output 174.It A 175process is waiting for space in output queue 176.It a 177process is waiting for output to complete 178.It X 179open for exclusive use 180.It S 181output stopped (ixon flow control) 182.It m 183output stopped (carrier flow control) 184.It o 185output stopped (CTS flow control) 186.It d 187output stopped (DSR flow control) 188.It K 189input stopped 190.It Y 191send SIGIO for input events 192.It D 193state for lowercase 194.Ql \e 195work 196.It E 197within a 198.Ql \e.../ 199for PRTRUB 200.It L 201next character is literal 202.It P 203retyping suspended input (PENDIN) 204.It N 205counting tab width, ignore FLUSHO 206.It l 207block mode input routine in use 208.It s 209i/o being snooped 210.It Z 211connection lost 212.El 213.It SESS 214Kernel address of the session structure. 215.It PGID 216Process group for which this is controlling terminal. 217.It DISC 218Line discipline; 219.Ql term 220for 221TTYDISC 222or 223.Ql ntty 224for 225NTTYDISC 226or 227.Ql tab 228for 229TABLDISC 230or 231.Ql slip 232for 233SLIPDISC 234or 235.Ql ppp 236for 237PPPDISC. 238.El 239.It Fl M 240Extract values associated with the name list from the specified core. 241.It Fl N 242If 243.Fl M 244is also specified, 245extract the name list from the specified system instead of the default, 246which is the kernel image the system has booted from. 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 BUGS 260Does not understand 261.Tn NFS 262swap servers. 263.Sh HISTORY 264The 265.Nm 266utility appeared in 267.Bx 4.0 . 268