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