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