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 March 21, 2005 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 Tfhknst 48.Op Fl M Ar core Op Fl N Ar system 49.Nm swapinfo 50.Op Fl hk 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 h 81.Dq Human-readable 82output. 83Use unit suffixes when printing swap partition sizes: 84Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. 85.It Fl k 86Print sizes in kilobytes, regardless of the setting of the 87.Ev BLOCKSIZE 88environment variable. 89.It Fl T 90Print the number of used and free slots in several system tables. 91This is useful for checking to see how large system tables have become 92if the system is under heavy load. 93.It Fl f 94Print the open file table with these headings: 95.Bl -tag -width indent 96.It LOC 97The core location of this table entry. 98.It TYPE 99The type of object the file table entry points to. 100.It FLG 101Miscellaneous state variables encoded thus: 102.Pp 103.Bl -tag -width indent -compact 104.It R 105open for reading 106.It W 107open for writing 108.It A 109open for appending 110.It I 111signal pgrp when data ready 112.El 113.It CNT 114Number of processes that know this open file. 115.It MSG 116Number of messages outstanding for this file. 117.It DATA 118The location of the vnode table entry or socket structure for this file. 119.It OFFSET 120The file offset (see 121.Xr lseek 2 ) . 122.El 123.It Fl s 124Print information about swap space usage on all the 125swap areas compiled into the kernel. 126The first column is the device name of the partition. 127The next column is 128the total space available in the partition. 129The 130.Ar Used 131column indicates the total blocks used so far; the 132.Ar Available 133column indicates how much space is remaining on each partition. 134The 135.Ar Capacity 136reports the percentage of space used. 137.Pp 138If more than one partition is configured into the system, totals for all 139of the statistics will be reported in the final line of the report. 140.It Fl t 141Print table for terminals 142with these headings: 143.Bl -tag -width indent 144.It LINE 145Device name. 146.It RAW 147Number of characters in raw input queue. 148.It CAN 149Number of characters in canonicalized input queue. 150.It OUT 151Number of characters in output queue. 152.It IHIWT 153High water mark for input. 154.It ILOWT 155Low water mark for input. 156.It OHWT 157High water mark for output. 158.It LWT 159Low water mark for output. 160.It COL 161Calculated column position of terminal. 162.It STATE 163Miscellaneous state variables encoded thus: 164.Pp 165.Bl -tag -width indent -compact 166.It T 167delay timeout in progress 168.It W 169waiting for open to complete 170.It O 171open 172.It F 173outq has been flushed during DMA 174.It C 175carrier is on 176.It c 177connection open 178.It B 179busy doing output 180.It A 181process is waiting for space in output queue 182.It a 183process is waiting for output to complete 184.It X 185open for exclusive use 186.It S 187output stopped (ixon flow control) 188.It m 189output stopped (carrier flow control) 190.It o 191output stopped (CTS flow control) 192.It d 193output stopped (DSR flow control) 194.It K 195input stopped 196.It Y 197send SIGIO for input events 198.It D 199state for lowercase 200.Ql \e 201work 202.It E 203within a 204.Ql \e.../ 205for PRTRUB 206.It L 207next character is literal 208.It P 209retyping suspended input (PENDIN) 210.It N 211counting tab width, ignore FLUSHO 212.It l 213block mode input routine in use 214.It s 215i/o being snooped 216.It Z 217connection lost 218.El 219.It SESS 220Kernel address of the session structure. 221.It PGID 222Process group for which this is the controlling terminal. 223.It DISC 224Line discipline; 225.Ql term 226for 227TTYDISC 228or 229.Ql ntty 230for 231NTTYDISC 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 HISTORY 262The 263.Nm 264utility appeared in 265.Bx 4.0 . 266.Sh BUGS 267Does not understand 268.Tn NFS 269swap servers. 270