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.\" $Id: pstat.8,v 1.13 1997/03/11 13:00:38 peter Exp $ 34.\" 35.Dd May 13, 1994 36.Dt PSTAT 8 37.Os BSD 4 38.Sh NAME 39.Nm pstat , 40.Nm swapinfo 41.Nd display system data structures 42.Sh SYNOPSIS 43.Nm pstat 44.Op Fl Tfiknstv 45.Op Fl M Ar core 46.Op Fl N Ar system 47.Pp 48.Nm swapinfo 49.Op Fl k 50.Sh DESCRIPTION 51.Nm Pstat 52displays open file entry, swap space utilization, 53terminal state, and vnode data structures. 54If 55.Ar corefile 56is given, the information is sought there, otherwise 57in 58.Pa /dev/kmem . 59The required namelist is taken from 60.Pa /kernel 61unless 62.Ar system 63is specified. 64.Pp 65If invoked as 66.Nm swapinfo 67the 68.Fl s 69option is implied, and only the 70.Fl k 71option is legal. 72.Pp 73Options are 74.Bl -tag -width indent 75.It Fl n 76Print devices out by major/minor instead of name. 77.It Fl k 78Print sizes in kilobytes, regardless of the setting of the BLOCKSIZE 79environment variable. 80.It Fl T 81Prints the number of used and free slots in the several system tables 82and is useful for checking to see how large system tables have become 83if the system is under heavy load. 84.It Fl f 85Print the open file table with these headings: 86.Bl -tag -width indent 87.It LOC 88The core location of this table entry. 89.It TYPE 90The type of object the file table entry points to. 91.It FLG 92Miscellaneous state variables encoded thus: 93.Bl -tag -width indent 94.It R 95open for reading 96.It W 97open for writing 98.It A 99open for appending 100.It S 101shared lock present 102.It X 103exclusive lock present 104.It I 105signal pgrp when data ready 106.El 107.It CNT 108Number of processes that know this open file. 109.It MSG 110Number of messages outstanding for this file. 111.It DATA 112The location of the vnode table entry or socket structure for this file. 113.It OFFSET 114The file offset (see 115.Xr lseek 2 ) . 116.El 117.It Fl s 118Print information about swap space usage on all the 119swap areas compiled into the kernel. 120The first column is the device name of the partition. The next column is 121the total space available in the partition. The 122.Ar Used 123column indicates the total blocks used so far; the 124.Ar Available 125column indicates how much space is remaining on each partition. 126The 127.Ar Capacity 128reports the percentage of space used. 129.Pp 130If more than one partition is configured into the system, totals for all 131of the statistics will be reported in the final line of the report. 132.It Fl t 133Print table for terminals 134with these headings: 135.Bl -tag -width indent 136.It RAW 137Number of characters in raw input queue. 138.It CAN 139Number of characters in canonicalized input queue. 140.It OUT 141Number of characters in output queue. 142.It MODE 143See 144.Xr tty 4 . 145.It ADDR 146Physical device address. 147.It DEL 148Number of delimiters (newlines) in canonicalized input queue. 149.It COL 150Calculated column position of terminal. 151.It STATE 152Miscellaneous state variables encoded thus: 153.Bl -tag -width indent 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 SIGIO for input events 186.It D 187state for lowercase 188.Ql \e 189work 190.It E 191within a 192.Ql \e.../ 193for PRTRUB 194.It L 195next character is literal 196.It P 197retyping suspended input (PENDIN) 198.It N 199counting tab width, ignore FLUSHO 200.It l 201block mode input routine in use 202.It s 203i/o being snooped 204.It Z 205connection lost 206.El 207.It SESS 208Kernel address of the session structure. 209.It PGID 210Process group for which this is controlling terminal. 211.It DISC 212Line discipline; 213.Ql term 214for 215TTYDISC 216or 217.Ql ntty 218for 219NTTYDISC 220or 221.Ql tab 222for 223TABLDISC 224or 225.Ql slip 226for 227SLIPDISC 228or 229.Ql ppp 230for 231PPPDISC. 232.El 233.It Fl v 234Print the active vnodes. Each group of vnodes corresponding 235to a particular filesystem is preceded by a two line header. The 236first line consists of the following: 237.Pp 238.Df I 239.No *** MOUNT Em fstype from 240on 241.Em on fsflags 242.De 243.Pp 244where 245.Em fstype 246is one of 247.Em ufs , nfs , mfs , or pc ; 248.Em from 249is the filesystem is mounted from; 250.Em on 251is the directory 252the filesystem is mounted on; and 253.Em fsflags 254is a list 255of optional flags applied to the mount (see 256.Xr mount 8 ) . 257.The second line is a header for the individual fields , 258the first part of which are fixed, and the second part are filesystem 259type specific. The headers common to all vnodes are: 260.Bl -tag -width indent 261.It ADDR 262Location of this vnode. 263.It TYP 264File type. 265.It VFLAG 266.Pp 267A list of letters representing vnode flags: 268.Bl -tag -width indent 269.It R 270\- VROOT 271.It T 272\- VTEXT 273.It S 274\- VSYSTEM 275.It t 276\- VISTTY 277.It L 278\- VXLOCK 279.It W 280\- VXWANT 281.It B 282\- VBWAIT 283.It A 284\- VALIASED 285.It V 286\- VVMIO 287.It a 288\- VAGE 289.It l 290\- VOLOCK 291.It w 292\- VOWANT 293.El 294.Pp 295.It USE 296The number of references to this vnode. 297.It HOLD 298The number of I/O buffers held by this vnode. 299.It FILEID 300The vnode fileid. 301In the case of 302.Em ufs 303this is the inode number. 304.It IFLAG 305Miscellaneous filesystem specific state variables encoded thus: 306.Bl -tag -width indent 307.It "For ufs:" 308.Pp 309.Bl -tag -width indent 310.It L 311locked 312.It U 313update time 314.Pq Xr fs 5 315must be corrected 316.It A 317access time must be corrected 318.It W 319wanted by another process (L flag is on) 320.It C 321changed time must be corrected 322.It S 323shared lock applied 324.It E 325exclusive lock applied 326.It Z 327someone waiting for a lock 328.It M 329contains modifications 330.It R 331has a rename in progress 332.El 333.It "For nfs:" 334.Bl -tag -width indent 335.It W 336waiting for I/O buffer flush to complete 337.It P 338I/O buffers being flushed 339.It M 340locally modified data exists 341.It E 342an earlier write failed 343.It X 344non-cacheable lease (nqnfs) 345.It O 346write lease (nqnfs) 347.It G 348lease was evicted (nqnfs) 349.El 350.El 351.It SIZ/RDEV 352Number of bytes in an ordinary file, or 353major and minor device of special file. 354.El 355.It Fl i 356Same as 357.Fl v , 358present for backwards-compatibility. 359.El 360.Sh FILES 361.Bl -tag -width /dev/kmemxxx -compact 362.It Pa /kernel 363namelist 364.It Pa /dev/kmem 365default source of tables 366.El 367.Sh SEE ALSO 368.Xr ps 1 , 369.Xr systat 1 , 370.Xr stat 2 , 371.Xr fs 5 , 372.Xr iostat 8 , 373.Xr vmstat 8 374.Rs 375.Rt Tn UNIX Rt Implementation , 376.Ra K. Thompson 377.Re 378.Sh BUGS 379Does not understand NFS swap servers. 380.Sh HISTORY 381The 382.Nm pstat 383command appeared in 384.Bx 4.0 . 385