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