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 LINE 140Device name. 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 IHIWT 148High water mark for input. 149.It ILOWT 150Low water mark for input. 151.It OHWT 152High water mark for output. 153.It LWT 154Low water mark for output. 155.It COL 156Calculated column position of terminal. 157.It STATE 158Miscellaneous state variables encoded thus: 159.Pp 160.Bl -tag -width indent -compact 161.It T 162delay timeout in progress 163.It W 164waiting for open to complete 165.It O 166open 167.It F 168outq has been flushed during DMA 169.It C 170carrier is on 171.It c 172connection open 173.It B 174busy doing output 175.It A 176process is waiting for space in output queue 177.It a 178process is waiting for output to complete 179.It X 180open for exclusive use 181.It S 182output stopped (ixon flow control) 183.It m 184output stopped (carrier flow control) 185.It o 186output stopped (CTS flow control) 187.It d 188output stopped (DSR flow control) 189.It K 190input stopped 191.It Y 192send SIGIO for input events 193.It D 194state for lowercase 195.Ql \e 196work 197.It E 198within a 199.Ql \e.../ 200for PRTRUB 201.It L 202next character is literal 203.It P 204retyping suspended input (PENDIN) 205.It N 206counting tab width, ignore FLUSHO 207.It l 208block mode input routine in use 209.It s 210i/o being snooped 211.It Z 212connection lost 213.El 214.It SESS 215Kernel address of the session structure. 216.It PGID 217Process group for which this is the controlling terminal. 218.It DISC 219Line discipline; 220.Ql term 221for 222TTYDISC 223or 224.Ql ntty 225for 226NTTYDISC 227or 228.Ql slip 229for 230SLIPDISC 231or 232.Ql ppp 233for 234PPPDISC. 235.El 236.It Fl M 237Extract values associated with the name list from the specified core. 238.It Fl N 239If 240.Fl M 241is also specified, 242extract the name list from the specified system instead of the default, 243which is the kernel image the system has booted from. 244.El 245.Sh SEE ALSO 246.Xr ps 1 , 247.Xr systat 1 , 248.Xr stat 2 , 249.Xr fs 5 , 250.Xr iostat 8 , 251.Xr vmstat 8 252.Rs 253.%T UNIX Implementation 254.%A K. Thompson 255.Re 256.Sh HISTORY 257The 258.Nm 259utility appeared in 260.Bx 4.0 . 261.Sh BUGS 262Does not understand 263.Tn NFS 264swap servers. 265