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. 19fbbd9655SWarner Losh.\" 3. 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.\" 35*39ad6e28SFelix Johnson.Dd July 8, 2022 36dea673e9SRodney W. Grimes.Dt PSTAT 8 37a4c37c81SRuslan Ermilov.Os 38dea673e9SRodney W. Grimes.Sh NAME 399b25840fSJoerg Wunsch.Nm pstat , 409b25840fSJoerg Wunsch.Nm swapinfo 41dea673e9SRodney W. Grimes.Nd display system data structures 42dea673e9SRodney W. Grimes.Sh SYNOPSIS 43e97407b4SRuslan Ermilov.Nm 44ae35e8adSRuslan Ermilov.Op Fl Tfghkmnst 458482be06SRuslan Ermilov.Op Fl M Ar core Op Fl N Ar system 4659392fe2SPoul-Henning Kamp.Nm swapinfo 47ae35e8adSRuslan Ermilov.Op Fl ghkm 488482be06SRuslan Ermilov.Op Fl M Ar core Op Fl N Ar system 49dea673e9SRodney W. Grimes.Sh DESCRIPTION 50490d5836SPhilippe CharnierThe 51490d5836SPhilippe Charnier.Nm 52490d5836SPhilippe Charnierutility displays open file entry, swap space utilization, 53dea673e9SRodney W. Grimesterminal state, and vnode data structures. 5459392fe2SPoul-Henning Kamp.Pp 5559392fe2SPoul-Henning KampIf invoked as 5659392fe2SPoul-Henning Kamp.Nm swapinfo 5759392fe2SPoul-Henning Kampthe 5859392fe2SPoul-Henning Kamp.Fl s 5959392fe2SPoul-Henning Kampoption is implied, and only the 60ae35e8adSRuslan Ermilov.Fl k , m , g , 617e8409a7SMark Murrayand 627e8409a7SMark Murray.Fl h 637e8409a7SMark Murrayoptions are legal. 64dea673e9SRodney W. Grimes.Pp 658482be06SRuslan ErmilovIf the 660b46bb97SRuslan Ermilov.Fl M 678482be06SRuslan Ermilovoption is not specified, information is obtained from 680b46bb97SRuslan Ermilovthe currently running kernel via the 690b46bb97SRuslan Ermilov.Xr sysctl 3 700b46bb97SRuslan Ermilovinterface. 710b46bb97SRuslan ErmilovOtherwise, information is read from the specified core file, 720b46bb97SRuslan Ermilovusing the name list from the specified kernel image (or from 730b46bb97SRuslan Ermilovthe default image). 740b46bb97SRuslan Ermilov.Pp 75d9961cfdSPhilippe CharnierThe following options are available: 76dea673e9SRodney W. Grimes.Bl -tag -width indent 7759392fe2SPoul-Henning Kamp.It Fl n 7859392fe2SPoul-Henning KampPrint devices out by major/minor instead of name. 797257230fSGiorgos Keramidas.It Fl h 807257230fSGiorgos Keramidas.Dq Human-readable 817257230fSGiorgos Keramidasoutput. 827257230fSGiorgos KeramidasUse unit suffixes when printing swap partition sizes: 837257230fSGiorgos KeramidasByte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. 8459392fe2SPoul-Henning Kamp.It Fl k 857c0e6e50SPhilippe CharnierPrint sizes in kilobytes, regardless of the setting of the 867c0e6e50SPhilippe Charnier.Ev BLOCKSIZE 8759392fe2SPoul-Henning Kampenvironment variable. 887e8409a7SMark Murray.It Fl m 897e8409a7SMark MurrayPrint sizes in megabytes, regardless of the setting of the 907e8409a7SMark Murray.Ev BLOCKSIZE 917e8409a7SMark Murrayenvironment variable. 927e8409a7SMark Murray.It Fl g 937e8409a7SMark MurrayPrint sizes in gigabytes, regardless of the setting of the 947e8409a7SMark Murray.Ev BLOCKSIZE 957e8409a7SMark Murrayenvironment variable. 96dea673e9SRodney W. Grimes.It Fl T 9765834d4bSJens SchweikhardtPrint the number of used and free slots in several system tables. 9865834d4bSJens SchweikhardtThis is useful for checking to see how large system tables have become 99dea673e9SRodney W. Grimesif the system is under heavy load. 100dea673e9SRodney W. Grimes.It Fl f 101dea673e9SRodney W. GrimesPrint the open file table with these headings: 102dea673e9SRodney W. Grimes.Bl -tag -width indent 103dea673e9SRodney W. Grimes.It LOC 104dea673e9SRodney W. GrimesThe core location of this table entry. 105dea673e9SRodney W. Grimes.It TYPE 106dea673e9SRodney W. GrimesThe type of object the file table entry points to. 107dea673e9SRodney W. Grimes.It FLG 108dea673e9SRodney W. GrimesMiscellaneous state variables encoded thus: 1090985ff69SRuslan Ermilov.Pp 1100985ff69SRuslan Ermilov.Bl -tag -width indent -compact 111dea673e9SRodney W. Grimes.It R 112dea673e9SRodney W. Grimesopen for reading 113dea673e9SRodney W. Grimes.It W 114dea673e9SRodney W. Grimesopen for writing 115dea673e9SRodney W. Grimes.It A 116dea673e9SRodney W. Grimesopen for appending 117dea673e9SRodney W. Grimes.It I 118dea673e9SRodney W. Grimessignal pgrp when data ready 119dea673e9SRodney W. Grimes.El 120dea673e9SRodney W. Grimes.It CNT 121dea673e9SRodney W. GrimesNumber of processes that know this open file. 122dea673e9SRodney W. Grimes.It MSG 123dea673e9SRodney W. GrimesNumber of messages outstanding for this file. 124dea673e9SRodney W. Grimes.It DATA 125dea673e9SRodney W. GrimesThe location of the vnode table entry or socket structure for this file. 126dea673e9SRodney W. Grimes.It OFFSET 127dea673e9SRodney W. GrimesThe file offset (see 128dea673e9SRodney W. Grimes.Xr lseek 2 ) . 129dea673e9SRodney W. Grimes.El 130dea673e9SRodney W. Grimes.It Fl s 131dea673e9SRodney W. GrimesPrint information about swap space usage on all the 132dea673e9SRodney W. Grimesswap areas compiled into the kernel. 13307bfccd7SRuslan ErmilovThe first column is the device name of the partition. 13407bfccd7SRuslan ErmilovThe next column is 13507bfccd7SRuslan Ermilovthe total space available in the partition. 13607bfccd7SRuslan ErmilovThe 137dea673e9SRodney W. Grimes.Ar Used 138dea673e9SRodney W. Grimescolumn indicates the total blocks used so far; the 139dea673e9SRodney W. Grimes.Ar Available 140dea673e9SRodney W. Grimescolumn indicates how much space is remaining on each partition. 141dea673e9SRodney W. GrimesThe 142dea673e9SRodney W. Grimes.Ar Capacity 143dea673e9SRodney W. Grimesreports the percentage of space used. 144dea673e9SRodney W. Grimes.Pp 145dea673e9SRodney W. GrimesIf more than one partition is configured into the system, totals for all 146dea673e9SRodney W. Grimesof the statistics will be reported in the final line of the report. 147dea673e9SRodney W. Grimes.It Fl t 148dea673e9SRodney W. GrimesPrint table for terminals 149dea673e9SRodney W. Grimeswith these headings: 150dea673e9SRodney W. Grimes.Bl -tag -width indent 1517aaa4825SDiomidis Spinellis.It LINE 1527aaa4825SDiomidis SpinellisDevice name. 153bc093719SEd Schouten.It INQ 154bc093719SEd SchoutenNumber of characters that can be stored in the input queue. 155dea673e9SRodney W. Grimes.It CAN 156bc093719SEd SchoutenNumber of characters in the input queue which can be read. 157bc093719SEd Schouten.It LIN 158bc093719SEd SchoutenNumber of characters in the input queue which cannot be read yet. 159bc093719SEd Schouten.It LOW 1607aaa4825SDiomidis SpinellisLow water mark for input. 161bc093719SEd Schouten.It OUTQ 162bc093719SEd SchoutenNumber of characters that can be stored in the output queue. 163bc093719SEd Schouten.It USE 164bc093719SEd SchoutenNumber of bytes in the output queue. 165bc093719SEd Schouten.It LOW 1669d5a92eeSEd SchoutenLow water mark for output. 167dea673e9SRodney W. Grimes.It COL 168dea673e9SRodney W. GrimesCalculated column position of terminal. 1693f692954SBruce Evans.It SESS 1703e83ac2bSJilles TjoelkerProcess ID of the session leader. 1713f692954SBruce Evans.It PGID 1727aaa4825SDiomidis SpinellisProcess group for which this is the controlling terminal. 173bc093719SEd Schouten.It STATE 174bc093719SEd SchoutenMiscellaneous state variables encoded thus: 175bc093719SEd Schouten.Pp 176bc093719SEd Schouten.Bl -tag -width indent -compact 177bc093719SEd Schouten.It I 178bc093719SEd Schouteninit/lock-state device nodes present 179bc093719SEd Schouten.It C 180bc093719SEd Schoutencallout device nodes present 181bc093719SEd Schouten.It O 182bc093719SEd Schoutenopened 183c3328b2aSEd Schouten.It c 184c3328b2aSEd Schoutenconsole in use 185bc093719SEd Schouten.It G 186bc093719SEd Schoutengone 187bc093719SEd Schouten.It B 188bc093719SEd Schoutenbusy in 189bc093719SEd Schouten.Xr open 2 190bc093719SEd Schouten.It Y 191bc093719SEd Schoutensend SIGIO for input events 192bc093719SEd Schouten.It L 193bc093719SEd Schoutennext character is literal 194bc093719SEd Schouten.It H 195bc093719SEd Schoutenhigh watermark reached 196bc093719SEd Schouten.It X 197bc093719SEd Schoutenopen for exclusive use 198bc093719SEd Schouten.It S 199bc093719SEd Schoutenoutput stopped (ixon flow control) 200bc093719SEd Schouten.It l 201bc093719SEd Schoutenblock mode input routine in use 202bc093719SEd Schouten.It Z 203bc093719SEd Schoutenconnection lost 204a1215e37SEd Schouten.It s 205a1215e37SEd Schouteni/o being snooped 206c0086bf2SEd Schouten.It b 207c0086bf2SEd Schoutenbusy in 208c0086bf2SEd Schouten.Xr read 2 209c0086bf2SEd Schoutenor 210c0086bf2SEd Schouten.Xr write 2 211bc093719SEd Schouten.El 212bc093719SEd Schouten.Pp 213bc093719SEd SchoutenThe 214bc093719SEd Schouten.Ql i 215bc093719SEd Schoutenand 216bc093719SEd Schouten.Ql o 217bc093719SEd Schoutencharacters refer to the previous character, to differentiate between 218bc093719SEd Schouteninput and output. 219dea673e9SRodney W. Grimes.El 220a82684b6SBen Smithurst.It Fl M 2210b46bb97SRuslan ErmilovExtract values associated with the name list from the specified core. 222a82684b6SBen Smithurst.It Fl N 2238482be06SRuslan ErmilovIf 2248482be06SRuslan Ermilov.Fl M 2258482be06SRuslan Ermilovis also specified, 2268482be06SRuslan Ermilovextract the name list from the specified system instead of the default, 2270b46bb97SRuslan Ermilovwhich is the kernel image the system has booted from. 228dea673e9SRodney W. Grimes.El 229*39ad6e28SFelix Johnson.Sh ENVIRONMENT 230*39ad6e28SFelix Johnson.Bl -tag -width BLOCKSIZE 231*39ad6e28SFelix Johnson.It Ev BLOCKSIZE 232*39ad6e28SFelix JohnsonIf the environment variable 233*39ad6e28SFelix Johnson.Ev BLOCKSIZE 234*39ad6e28SFelix Johnsonis set, and the 235*39ad6e28SFelix Johnson.Fl h , k , 236*39ad6e28SFelix Johnsonor 237*39ad6e28SFelix Johnson.Fl m 238*39ad6e28SFelix Johnsonoptions are not specified, the block counts will be displayed in units of 239*39ad6e28SFelix Johnsonthat block size. 240*39ad6e28SFelix JohnsonIf 241*39ad6e28SFelix Johnson.Ev BLOCKSIZE 242*39ad6e28SFelix Johnsonis not set, and the 243*39ad6e28SFelix Johnson.Fl h , k , 244*39ad6e28SFelix Johnsonor 245*39ad6e28SFelix Johnson.Fl m 246*39ad6e28SFelix Johnsonoptions are not specified, the block counts will be displayed in 512-byte 247*39ad6e28SFelix Johnsonblocks. 248*39ad6e28SFelix Johnson.El 249dea673e9SRodney W. Grimes.Sh SEE ALSO 250dea673e9SRodney W. Grimes.Xr ps 1 , 251dea673e9SRodney W. Grimes.Xr systat 1 , 252dea673e9SRodney W. Grimes.Xr stat 2 , 253dea673e9SRodney W. Grimes.Xr fs 5 , 254270d3d75SMike Pritchard.Xr iostat 8 , 255270d3d75SMike Pritchard.Xr vmstat 8 256dea673e9SRodney W. Grimes.Rs 2578b5c4af3SRuslan Ermilov.%T UNIX Implementation 2588b5c4af3SRuslan Ermilov.%A K. Thompson 259dea673e9SRodney W. Grimes.Re 260dea673e9SRodney W. Grimes.Sh HISTORY 261dea673e9SRodney W. GrimesThe 262e97407b4SRuslan Ermilov.Nm 263490d5836SPhilippe Charnierutility appeared in 264c0b0bcf4SMike Pritchard.Bx 4.0 . 26559a3c79dSRuslan Ermilov.Sh BUGS 26659a3c79dSRuslan ErmilovDoes not understand 26759a3c79dSRuslan Ermilov.Tn NFS 26859a3c79dSRuslan Ermilovswap servers. 269