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