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