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