1dea673e9SRodney W. Grimes.\" Copyright (c) 1980, 1991, 1993, 1994 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3eeebf53eSDag-Erling Smørgrav.\" Copyright (c) 2002 Networks Associates Technology, Inc. 4eeebf53eSDag-Erling Smørgrav.\" All rights reserved. 5eeebf53eSDag-Erling Smørgrav.\" 6eeebf53eSDag-Erling Smørgrav.\" Portions of this software was developed for the FreeBSD Project by 7eeebf53eSDag-Erling Smørgrav.\" ThinkSec AS and NAI Labs, the Security Research Division of Network 8eeebf53eSDag-Erling Smørgrav.\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 9eeebf53eSDag-Erling Smørgrav.\" ("CBOSS"), as part of the DARPA CHATS research program. 10dea673e9SRodney W. Grimes.\" 11dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 12dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 13dea673e9SRodney W. Grimes.\" are met: 14dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 15dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 16dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 17dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 18dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 19dea673e9SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 20dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 21dea673e9SRodney W. Grimes.\" without specific prior written permission. 22dea673e9SRodney W. Grimes.\" 23dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 34dea673e9SRodney W. Grimes.\" 359c5cdfe0SPeter Wemm.\" @(#)pstat.8 8.5 (Berkeley) 5/13/94 3697d92980SPeter Wemm.\" $FreeBSD$ 37dea673e9SRodney W. Grimes.\" 387257230fSGiorgos Keramidas.Dd March 21, 2005 39dea673e9SRodney W. Grimes.Dt PSTAT 8 40a4c37c81SRuslan Ermilov.Os 41dea673e9SRodney W. Grimes.Sh NAME 429b25840fSJoerg Wunsch.Nm pstat , 439b25840fSJoerg Wunsch.Nm swapinfo 44dea673e9SRodney W. Grimes.Nd display system data structures 45dea673e9SRodney W. Grimes.Sh SYNOPSIS 46e97407b4SRuslan Ermilov.Nm 477257230fSGiorgos Keramidas.Op Fl Tfhknst 488482be06SRuslan Ermilov.Op Fl M Ar core Op Fl N Ar system 4959392fe2SPoul-Henning Kamp.Nm swapinfo 507257230fSGiorgos Keramidas.Op Fl hk 518482be06SRuslan Ermilov.Op Fl M Ar core Op Fl N Ar system 52dea673e9SRodney W. Grimes.Sh DESCRIPTION 53490d5836SPhilippe CharnierThe 54490d5836SPhilippe Charnier.Nm 55490d5836SPhilippe Charnierutility displays open file entry, swap space utilization, 56dea673e9SRodney W. Grimesterminal state, and vnode data structures. 5759392fe2SPoul-Henning Kamp.Pp 5859392fe2SPoul-Henning KampIf invoked as 5959392fe2SPoul-Henning Kamp.Nm swapinfo 6059392fe2SPoul-Henning Kampthe 6159392fe2SPoul-Henning Kamp.Fl s 6259392fe2SPoul-Henning Kampoption is implied, and only the 637e8409a7SMark Murray.Fl [kmg] 647e8409a7SMark Murrayand 657e8409a7SMark Murray.Fl h 667e8409a7SMark Murrayoptions are legal. 67dea673e9SRodney W. Grimes.Pp 688482be06SRuslan ErmilovIf the 690b46bb97SRuslan Ermilov.Fl M 708482be06SRuslan Ermilovoption is not specified, information is obtained from 710b46bb97SRuslan Ermilovthe currently running kernel via the 720b46bb97SRuslan Ermilov.Xr sysctl 3 730b46bb97SRuslan Ermilovinterface. 740b46bb97SRuslan ErmilovOtherwise, information is read from the specified core file, 750b46bb97SRuslan Ermilovusing the name list from the specified kernel image (or from 760b46bb97SRuslan Ermilovthe default image). 770b46bb97SRuslan Ermilov.Pp 78d9961cfdSPhilippe CharnierThe following options are available: 79dea673e9SRodney W. Grimes.Bl -tag -width indent 8059392fe2SPoul-Henning Kamp.It Fl n 8159392fe2SPoul-Henning KampPrint devices out by major/minor instead of name. 827257230fSGiorgos Keramidas.It Fl h 837257230fSGiorgos Keramidas.Dq Human-readable 847257230fSGiorgos Keramidasoutput. 857257230fSGiorgos KeramidasUse unit suffixes when printing swap partition sizes: 867257230fSGiorgos KeramidasByte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. 8759392fe2SPoul-Henning Kamp.It Fl k 887c0e6e50SPhilippe CharnierPrint sizes in kilobytes, regardless of the setting of the 897c0e6e50SPhilippe Charnier.Ev BLOCKSIZE 9059392fe2SPoul-Henning Kampenvironment variable. 917e8409a7SMark Murray.It Fl m 927e8409a7SMark MurrayPrint sizes in megabytes, regardless of the setting of the 937e8409a7SMark Murray.Ev BLOCKSIZE 947e8409a7SMark Murrayenvironment variable. 957e8409a7SMark Murray.It Fl g 967e8409a7SMark MurrayPrint sizes in gigabytes, regardless of the setting of the 977e8409a7SMark Murray.Ev BLOCKSIZE 987e8409a7SMark Murrayenvironment variable. 99dea673e9SRodney W. Grimes.It Fl T 10065834d4bSJens SchweikhardtPrint the number of used and free slots in several system tables. 10165834d4bSJens SchweikhardtThis is useful for checking to see how large system tables have become 102dea673e9SRodney W. Grimesif the system is under heavy load. 103dea673e9SRodney W. Grimes.It Fl f 104dea673e9SRodney W. GrimesPrint the open file table with these headings: 105dea673e9SRodney W. Grimes.Bl -tag -width indent 106dea673e9SRodney W. Grimes.It LOC 107dea673e9SRodney W. GrimesThe core location of this table entry. 108dea673e9SRodney W. Grimes.It TYPE 109dea673e9SRodney W. GrimesThe type of object the file table entry points to. 110dea673e9SRodney W. Grimes.It FLG 111dea673e9SRodney W. GrimesMiscellaneous state variables encoded thus: 1120985ff69SRuslan Ermilov.Pp 1130985ff69SRuslan Ermilov.Bl -tag -width indent -compact 114dea673e9SRodney W. Grimes.It R 115dea673e9SRodney W. Grimesopen for reading 116dea673e9SRodney W. Grimes.It W 117dea673e9SRodney W. Grimesopen for writing 118dea673e9SRodney W. Grimes.It A 119dea673e9SRodney W. Grimesopen for appending 120dea673e9SRodney W. Grimes.It I 121dea673e9SRodney W. Grimessignal pgrp when data ready 122dea673e9SRodney W. Grimes.El 123dea673e9SRodney W. Grimes.It CNT 124dea673e9SRodney W. GrimesNumber of processes that know this open file. 125dea673e9SRodney W. Grimes.It MSG 126dea673e9SRodney W. GrimesNumber of messages outstanding for this file. 127dea673e9SRodney W. Grimes.It DATA 128dea673e9SRodney W. GrimesThe location of the vnode table entry or socket structure for this file. 129dea673e9SRodney W. Grimes.It OFFSET 130dea673e9SRodney W. GrimesThe file offset (see 131dea673e9SRodney W. Grimes.Xr lseek 2 ) . 132dea673e9SRodney W. Grimes.El 133dea673e9SRodney W. Grimes.It Fl s 134dea673e9SRodney W. GrimesPrint information about swap space usage on all the 135dea673e9SRodney W. Grimesswap areas compiled into the kernel. 13607bfccd7SRuslan ErmilovThe first column is the device name of the partition. 13707bfccd7SRuslan ErmilovThe next column is 13807bfccd7SRuslan Ermilovthe total space available in the partition. 13907bfccd7SRuslan ErmilovThe 140dea673e9SRodney W. Grimes.Ar Used 141dea673e9SRodney W. Grimescolumn indicates the total blocks used so far; the 142dea673e9SRodney W. Grimes.Ar Available 143dea673e9SRodney W. Grimescolumn indicates how much space is remaining on each partition. 144dea673e9SRodney W. GrimesThe 145dea673e9SRodney W. Grimes.Ar Capacity 146dea673e9SRodney W. Grimesreports the percentage of space used. 147dea673e9SRodney W. Grimes.Pp 148dea673e9SRodney W. GrimesIf more than one partition is configured into the system, totals for all 149dea673e9SRodney W. Grimesof the statistics will be reported in the final line of the report. 150dea673e9SRodney W. Grimes.It Fl t 151dea673e9SRodney W. GrimesPrint table for terminals 152dea673e9SRodney W. Grimeswith these headings: 153dea673e9SRodney W. Grimes.Bl -tag -width indent 1547aaa4825SDiomidis Spinellis.It LINE 1557aaa4825SDiomidis SpinellisDevice name. 156dea673e9SRodney W. Grimes.It RAW 157dea673e9SRodney W. GrimesNumber of characters in raw input queue. 158dea673e9SRodney W. Grimes.It CAN 159dea673e9SRodney W. GrimesNumber of characters in canonicalized input queue. 160dea673e9SRodney W. Grimes.It OUT 161c2dc07c8SAlexander LangerNumber of characters in output queue. 1627aaa4825SDiomidis Spinellis.It IHIWT 1637aaa4825SDiomidis SpinellisHigh water mark for input. 1647aaa4825SDiomidis Spinellis.It ILOWT 1657aaa4825SDiomidis SpinellisLow water mark for input. 1667aaa4825SDiomidis Spinellis.It OHWT 1677aaa4825SDiomidis SpinellisHigh water mark for output. 1687aaa4825SDiomidis Spinellis.It LWT 1697aaa4825SDiomidis SpinellisLow water mark for output. 170dea673e9SRodney W. Grimes.It COL 171dea673e9SRodney W. GrimesCalculated column position of terminal. 172dea673e9SRodney W. Grimes.It STATE 173dea673e9SRodney W. GrimesMiscellaneous state variables encoded thus: 1740985ff69SRuslan Ermilov.Pp 1750985ff69SRuslan Ermilov.Bl -tag -width indent -compact 176dea673e9SRodney W. Grimes.It T 177dea673e9SRodney W. Grimesdelay timeout in progress 178dea673e9SRodney W. Grimes.It W 179dea673e9SRodney W. Grimeswaiting for open to complete 180dea673e9SRodney W. Grimes.It O 181dea673e9SRodney W. Grimesopen 182dea673e9SRodney W. Grimes.It F 183dea673e9SRodney W. Grimesoutq has been flushed during DMA 184dea673e9SRodney W. Grimes.It C 185dea673e9SRodney W. Grimescarrier is on 186283fecc1SBruce Evans.It c 187283fecc1SBruce Evansconnection open 188dea673e9SRodney W. Grimes.It B 189dea673e9SRodney W. Grimesbusy doing output 190dea673e9SRodney W. Grimes.It A 191283fecc1SBruce Evansprocess is waiting for space in output queue 192283fecc1SBruce Evans.It a 193283fecc1SBruce Evansprocess is waiting for output to complete 194dea673e9SRodney W. Grimes.It X 195dea673e9SRodney W. Grimesopen for exclusive use 196dea673e9SRodney W. Grimes.It S 197283fecc1SBruce Evansoutput stopped (ixon flow control) 198283fecc1SBruce Evans.It m 199283fecc1SBruce Evansoutput stopped (carrier flow control) 200283fecc1SBruce Evans.It o 201283fecc1SBruce Evansoutput stopped (CTS flow control) 202283fecc1SBruce Evans.It d 203283fecc1SBruce Evansoutput stopped (DSR flow control) 204283fecc1SBruce Evans.It K 205283fecc1SBruce Evansinput stopped 206283fecc1SBruce Evans.It Y 207283fecc1SBruce Evanssend SIGIO for input events 2083f692954SBruce Evans.It D 2093f692954SBruce Evansstate for lowercase 2103f692954SBruce Evans.Ql \e 2113f692954SBruce Evanswork 2123f692954SBruce Evans.It E 2133f692954SBruce Evanswithin a 2143f692954SBruce Evans.Ql \e.../ 2153f692954SBruce Evansfor PRTRUB 2163f692954SBruce Evans.It L 2173f692954SBruce Evansnext character is literal 2183f692954SBruce Evans.It P 2193f692954SBruce Evansretyping suspended input (PENDIN) 2203f692954SBruce Evans.It N 2213f692954SBruce Evanscounting tab width, ignore FLUSHO 222283fecc1SBruce Evans.It l 223283fecc1SBruce Evansblock mode input routine in use 224283fecc1SBruce Evans.It s 225283fecc1SBruce Evansi/o being snooped 226283fecc1SBruce Evans.It Z 227283fecc1SBruce Evansconnection lost 228dea673e9SRodney W. Grimes.El 2293f692954SBruce Evans.It SESS 2303f692954SBruce EvansKernel address of the session structure. 2313f692954SBruce Evans.It PGID 2327aaa4825SDiomidis SpinellisProcess group for which this is the controlling terminal. 233dea673e9SRodney W. Grimes.It DISC 234283fecc1SBruce EvansLine discipline; 235283fecc1SBruce Evans.Ql term 236283fecc1SBruce Evansfor 237283fecc1SBruce EvansTTYDISC 238dea673e9SRodney W. Grimesor 239283fecc1SBruce Evans.Ql ntty 240dea673e9SRodney W. Grimesfor 241dea673e9SRodney W. GrimesNTTYDISC 242dea673e9SRodney W. Grimesor 243283fecc1SBruce Evans.Ql slip 244283fecc1SBruce Evansfor 245283fecc1SBruce EvansSLIPDISC 246283fecc1SBruce Evansor 247283fecc1SBruce Evans.Ql ppp 248283fecc1SBruce Evansfor 249283fecc1SBruce EvansPPPDISC. 250dea673e9SRodney W. Grimes.El 251a82684b6SBen Smithurst.It Fl M 2520b46bb97SRuslan ErmilovExtract values associated with the name list from the specified core. 253a82684b6SBen Smithurst.It Fl N 2548482be06SRuslan ErmilovIf 2558482be06SRuslan Ermilov.Fl M 2568482be06SRuslan Ermilovis also specified, 2578482be06SRuslan Ermilovextract the name list from the specified system instead of the default, 2580b46bb97SRuslan Ermilovwhich is the kernel image the system has booted from. 259dea673e9SRodney W. Grimes.El 260dea673e9SRodney W. Grimes.Sh SEE ALSO 261dea673e9SRodney W. Grimes.Xr ps 1 , 262dea673e9SRodney W. Grimes.Xr systat 1 , 263dea673e9SRodney W. Grimes.Xr stat 2 , 264dea673e9SRodney W. Grimes.Xr fs 5 , 265270d3d75SMike Pritchard.Xr iostat 8 , 266270d3d75SMike Pritchard.Xr vmstat 8 267dea673e9SRodney W. Grimes.Rs 2688b5c4af3SRuslan Ermilov.%T UNIX Implementation 2698b5c4af3SRuslan Ermilov.%A K. Thompson 270dea673e9SRodney W. Grimes.Re 271dea673e9SRodney W. Grimes.Sh HISTORY 272dea673e9SRodney W. GrimesThe 273e97407b4SRuslan Ermilov.Nm 274490d5836SPhilippe Charnierutility appeared in 275c0b0bcf4SMike Pritchard.Bx 4.0 . 27659a3c79dSRuslan Ermilov.Sh BUGS 27759a3c79dSRuslan ErmilovDoes not understand 27859a3c79dSRuslan Ermilov.Tn NFS 27959a3c79dSRuslan Ermilovswap servers. 280