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