19ddb49cbSWarner Losh.\"- 24b88c807SRodney W. Grimes.\" Copyright (c) 1980, 1990, 1991, 1993, 1994 34b88c807SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 44b88c807SRodney W. Grimes.\" 54b88c807SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 64b88c807SRodney W. Grimes.\" modification, are permitted provided that the following conditions 74b88c807SRodney W. Grimes.\" are met: 84b88c807SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 94b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 104b88c807SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 114b88c807SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 124b88c807SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 134b88c807SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 144b88c807SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 154b88c807SRodney W. Grimes.\" without specific prior written permission. 164b88c807SRodney W. Grimes.\" 174b88c807SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 184b88c807SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 194b88c807SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 204b88c807SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 214b88c807SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 224b88c807SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 234b88c807SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 244b88c807SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 254b88c807SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 264b88c807SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 274b88c807SRodney W. Grimes.\" SUCH DAMAGE. 284b88c807SRodney W. Grimes.\" 294b88c807SRodney W. Grimes.\" @(#)ps.1 8.3 (Berkeley) 4/18/94 302a456239SPeter Wemm.\" $FreeBSD$ 314b88c807SRodney W. Grimes.\" 323dc91da5SGarance A Drosehn.Dd March 27, 2004 334b88c807SRodney W. Grimes.Dt PS 1 34caa2db3bSRuslan Ermilov.Os 354b88c807SRodney W. Grimes.Sh NAME 36c9a8d1f4SPhilippe Charnier.Nm ps 374b88c807SRodney W. Grimes.Nd process status 384b88c807SRodney W. Grimes.Sh SYNOPSIS 39be8b1497SRuslan Ermilov.Nm 40a4c8a745SGarance A Drosehn.Op Fl aCcefHhjlmrSTuvwXxZ 41287d1861SRuslan Ermilov.Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... 424b88c807SRodney W. Grimes.Op Fl M Ar core 434b88c807SRodney W. Grimes.Op Fl N Ar system 444b88c807SRodney W. Grimes.Op Fl O Ar fmt 454b88c807SRodney W. Grimes.Op Fl o Ar fmt 46287d1861SRuslan Ermilov.Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ... 47287d1861SRuslan Ermilov.Op Fl t Ar tty Ns Op , Ns Ar tty Ns Ar ... 48287d1861SRuslan Ermilov.Op Fl U Ar username Ns Op , Ns Ar username Ns Ar ... 49be8b1497SRuslan Ermilov.Nm 504b88c807SRodney W. Grimes.Op Fl L 514b88c807SRodney W. Grimes.Sh DESCRIPTION 52e004acc8SPhilippe CharnierThe 53e004acc8SPhilippe Charnier.Nm 54e004acc8SPhilippe Charnierutility 558ed0d42fSGarance A Drosehndisplays a header line, followed by lines containing information about 568ed0d42fSGarance A Drosehnall of your 574b88c807SRodney W. Grimesprocesses that have controlling terminals. 584b88c807SRodney W. Grimes.Pp 59a4c8a745SGarance A DrosehnA different set of processes can be selected for display by using any 60a4c8a745SGarance A Drosehncombination of the 61287d1861SRuslan Ermilov.Fl a , G , p , T , t , 62a4c8a745SGarance A Drosehnand 63a4c8a745SGarance A Drosehn.Fl U 64a4c8a745SGarance A Drosehnoptions. 65a4c8a745SGarance A DrosehnIf more than one of these options are given, then 66a4c8a745SGarance A Drosehn.Nm 67a4c8a745SGarance A Drosehnwill select all processes which are matched by at least one of the 68a4c8a745SGarance A Drosehngiven options. 69a4c8a745SGarance A Drosehn.Pp 708ed0d42fSGarance A DrosehnFor the processes which have been selected for display, 718ed0d42fSGarance A Drosehn.Nm 728ed0d42fSGarance A Drosehnwill usually display one line per process. 738ed0d42fSGarance A DrosehnThe 748ed0d42fSGarance A Drosehn.Fl H 758ed0d42fSGarance A Drosehnoption may result in multiple output lines (one line per thread) for 768ed0d42fSGarance A Drosehnsome processes. 778ed0d42fSGarance A DrosehnBy default all of these output lines are sorted first by controlling 78287d1861SRuslan Ermilovterminal, then by process ID. 798ed0d42fSGarance A DrosehnThe 808ed0d42fSGarance A Drosehn.Fl m , r , u , 818ed0d42fSGarance A Drosehnand 828ed0d42fSGarance A Drosehn.Fl v 838ed0d42fSGarance A Drosehnoptions will change the sort order. 848ed0d42fSGarance A DrosehnIf more than one sorting option was given, then the selected processes 858ed0d42fSGarance A Drosehnwill be sorted by the last sorting option which was specified. 868ed0d42fSGarance A Drosehn.Pp 87a4c8a745SGarance A DrosehnFor the processes which have been selected for display, the information 88a4c8a745SGarance A Drosehnto display is selected based on a set of keywords (see the 89287d1861SRuslan Ermilov.Fl L , O , 904b88c807SRodney W. Grimesand 914b88c807SRodney W. Grimes.Fl o 924b88c807SRodney W. Grimesoptions). 93287d1861SRuslan ErmilovThe default output format includes, for each process, the process' ID, 94287d1861SRuslan Ermilovcontrolling terminal, CPU time (including both user and system time), 954b88c807SRodney W. Grimesstate, and associated command. 964b88c807SRodney W. Grimes.Pp 971c0c7731SJoerg WunschThe process file system (see 9846be34b9SKris Kennaway.Xr procfs 5 ) 9946be34b9SKris Kennawayshould be mounted when 1001c0c7731SJoerg Wunsch.Nm 1011c0c7731SJoerg Wunschis executed, otherwise not all information will be available. 1021c0c7731SJoerg Wunsch.Pp 1034b88c807SRodney W. GrimesThe options are as follows: 1044b88c807SRodney W. Grimes.Bl -tag -width indent 1054b88c807SRodney W. Grimes.It Fl a 1064b88c807SRodney W. GrimesDisplay information about other users' processes as well as your own. 107a4c8a745SGarance A DrosehnThis will skip any processes which do not have a controlling teminal, 108a4c8a745SGarance A Drosehnunless the 109a4c8a745SGarance A Drosehn.Fl x 110a4c8a745SGarance A Drosehnoption is also specified. 1117fa34c11SDima DorfmanThis can be disabled by setting the 112d883e289SJosef Karthauser.Va security.bsd.see_other_uids 1136b821228SDima Dorfmansysctl to zero. 114db91faacSPeter Wemm.It Fl c 115287d1861SRuslan ErmilovChange the 116287d1861SRuslan Ermilov.Dq command 117287d1861SRuslan Ermilovcolumn output to just contain the executable name, 118db91faacSPeter Wemmrather than the full command line. 1194b88c807SRodney W. Grimes.It Fl C 120287d1861SRuslan ErmilovChange the way the CPU percentage is calculated by using a 121287d1861SRuslan Ermilov.Dq raw 122287d1861SRuslan ErmilovCPU calculation that ignores 123287d1861SRuslan Ermilov.Dq resident 124287d1861SRuslan Ermilovtime (this normally has 1254b88c807SRodney W. Grimesno effect). 1264b88c807SRodney W. Grimes.It Fl e 1274b88c807SRodney W. GrimesDisplay the environment as well. 128b548141bSJohn Dyson.It Fl f 12977027e30SJoseph KoshyShow commandline and environment information about swapped out processes. 130287d1861SRuslan ErmilovThis option is honored only if the UID of the user is 0. 131a4c8a745SGarance A Drosehn.It Fl G 132a4c8a745SGarance A DrosehnDisplay information about processes which are running with the specified 133287d1861SRuslan Ermilovreal group IDs. 13448b8c0deSScott Long.It Fl H 13548b8c0deSScott LongShow all of the 13648b8c0deSScott Long.Em kernel visible 137287d1861SRuslan Ermilovthreads associated with each process. 138287d1861SRuslan ErmilovDepending on the threading package that 13948b8c0deSScott Longis in use, this may show only the process, only the kernel scheduled entities, 14048b8c0deSScott Longor all of the process threads. 1414b88c807SRodney W. Grimes.It Fl h 1424b88c807SRodney W. GrimesRepeat the information header as often as necessary to guarantee one 1434b88c807SRodney W. Grimesheader per page of information. 1444b88c807SRodney W. Grimes.It Fl j 1454b88c807SRodney W. GrimesPrint information associated with the following keywords: 146259fcfacSGarance A Drosehn.Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , 147287d1861SRuslan Ermilovand 148287d1861SRuslan Ermilov.Cm command . 1494b88c807SRodney W. Grimes.It Fl L 1508ed0d42fSGarance A DrosehnList the set of keywords available for the 1518ed0d42fSGarance A Drosehn.Fl O 1528ed0d42fSGarance A Drosehnand 1538ed0d42fSGarance A Drosehn.Fl o 1548ed0d42fSGarance A Drosehnoptions. 1554b88c807SRodney W. Grimes.It Fl l 1564b88c807SRodney W. GrimesDisplay information associated with the following keywords: 157287d1861SRuslan Ermilov.Cm uid , pid , ppid , cpu , pri , nice , vsz , rss , mwchan , state , 158287d1861SRuslan Ermilov.Cm tt , time , 159287d1861SRuslan Ermilovand 160287d1861SRuslan Ermilov.Cm command . 1614b88c807SRodney W. Grimes.It Fl M 1624b88c807SRodney W. GrimesExtract values associated with the name list from the specified core 163cd31922fSRuslan Ermilovinstead of the currently running system. 1644b88c807SRodney W. Grimes.It Fl m 1658ed0d42fSGarance A DrosehnSort by memory usage, instead of the combination of controlling 166287d1861SRuslan Ermilovterminal and process ID. 1674b88c807SRodney W. Grimes.It Fl N 168f9a480abSRuslan ErmilovExtract the name list from the specified system instead of the default, 169f9a480abSRuslan Ermilovwhich is the kernel image the system has booted from. 1704b88c807SRodney W. Grimes.It Fl O 1714b88c807SRodney W. GrimesAdd the information associated with the space or comma separated list 172287d1861SRuslan Ermilovof keywords specified, after the process ID, 1734b88c807SRodney W. Grimesin the default information 1744b88c807SRodney W. Grimesdisplay. 175287d1861SRuslan ErmilovKeywords may be appended with an equals 176287d1861SRuslan Ermilov.Pq Ql = 177287d1861SRuslan Ermilovsign and a string. 1784b88c807SRodney W. GrimesThis causes the printed header to use the specified string instead of 1794b88c807SRodney W. Grimesthe standard header. 1804b88c807SRodney W. Grimes.It Fl o 1812dda9fe9SJuli MallettDisplay information associated with the space or comma separated 1822dda9fe9SJuli Mallettlist of keywords specified. 18350355bb4SJuli MallettMultiple keywords may also be given in the form of more than one 18450355bb4SJuli Mallett.Fl o 18550355bb4SJuli Mallettoption. 186287d1861SRuslan ErmilovKeywords may be appended with an equals 187287d1861SRuslan Ermilov.Pq Ql = 188287d1861SRuslan Ermilovsign and a string. 1894b88c807SRodney W. GrimesThis causes the printed header to use the specified string instead of 1904b88c807SRodney W. Grimesthe standard header. 1914b88c807SRodney W. Grimes.It Fl p 192287d1861SRuslan ErmilovDisplay information about processes which match the specified process IDs. 1934b88c807SRodney W. Grimes.It Fl r 194287d1861SRuslan ErmilovSort by current CPU usage, instead of the combination of controlling 195287d1861SRuslan Ermilovterminal and process ID. 1964b88c807SRodney W. Grimes.It Fl S 1974b88c807SRodney W. GrimesChange the way the process time is calculated by summing all exited 1984b88c807SRodney W. Grimeschildren to their parent process. 1994b88c807SRodney W. Grimes.It Fl T 2004b88c807SRodney W. GrimesDisplay information about processes attached to the device associated 2014b88c807SRodney W. Grimeswith the standard input. 2024b88c807SRodney W. Grimes.It Fl t 2034b88c807SRodney W. GrimesDisplay information about processes attached to the specified terminal 204287d1861SRuslan Ermilovdevices. 20573eb8310SPeter Wemm.It Fl U 206287d1861SRuslan ErmilovDisplay the processes belonging to the specified usernames. 2074b88c807SRodney W. Grimes.It Fl u 2084b88c807SRodney W. GrimesDisplay information associated with the following keywords: 209287d1861SRuslan Ermilov.Cm user , pid , %cpu , %mem , vsz , rss , tt , state , start , time , 210287d1861SRuslan Ermilovand 211287d1861SRuslan Ermilov.Cm command . 2124b88c807SRodney W. GrimesThe 2134b88c807SRodney W. Grimes.Fl u 2144b88c807SRodney W. Grimesoption implies the 2154b88c807SRodney W. Grimes.Fl r 2164b88c807SRodney W. Grimesoption. 2174b88c807SRodney W. Grimes.It Fl v 2184b88c807SRodney W. GrimesDisplay information associated with the following keywords: 219287d1861SRuslan Ermilov.Cm pid , state , time , sl , re , pagein , vsz , rss , lim , tsiz , 220287d1861SRuslan Ermilov.Cm %cpu , %mem , 221287d1861SRuslan Ermilovand 222287d1861SRuslan Ermilov.Cm command . 2234b88c807SRodney W. GrimesThe 2244b88c807SRodney W. Grimes.Fl v 2254b88c807SRodney W. Grimesoption implies the 2264b88c807SRodney W. Grimes.Fl m 2274b88c807SRodney W. Grimesoption. 2284b88c807SRodney W. Grimes.It Fl w 2294b88c807SRodney W. GrimesUse 132 columns to display information, instead of the default which 2304b88c807SRodney W. Grimesis your window size. 2314b88c807SRodney W. GrimesIf the 2324b88c807SRodney W. Grimes.Fl w 2334b88c807SRodney W. Grimesoption is specified more than once, 234c9a8d1f4SPhilippe Charnier.Nm 2354b88c807SRodney W. Grimeswill use as many columns as necessary without regard for your window size. 236a4c8a745SGarance A Drosehn.It Fl X 237a4c8a745SGarance A DrosehnWhen displaying processes matched by other options, skip any processes 238a4c8a745SGarance A Drosehnwhich do not have a controlling terminal. 2394b88c807SRodney W. Grimes.It Fl x 240a4c8a745SGarance A DrosehnWhen displaying processes matched by other options, include processes 241a4c8a745SGarance A Drosehnwhich do not have a controlling terminal. 242a4c8a745SGarance A DrosehnThis is the opposite of the 243a4c8a745SGarance A Drosehn.Fl X 244a4c8a745SGarance A Drosehnoption. 245a4c8a745SGarance A DrosehnIf both 246a4c8a745SGarance A Drosehn.Fl X 247a4c8a745SGarance A Drosehnand 248a4c8a745SGarance A Drosehn.Fl x 249a4c8a745SGarance A Drosehnare specified in the same command, then 250a4c8a745SGarance A Drosehn.Nm 251a4c8a745SGarance A Drosehnwill use the one which was specified last. 2527304f61fSBrian Feldman.It Fl Z 253ac06cb0aSRobert WatsonAdd 254ac06cb0aSRobert Watson.Xr mac 4 255ac06cb0aSRobert Watsonlabel to the list of keywords for which 2567304f61fSBrian Feldman.Nm 2577304f61fSBrian Feldmanwill display information. 2584b88c807SRodney W. Grimes.El 2594b88c807SRodney W. Grimes.Pp 2604b88c807SRodney W. GrimesA complete list of the available keywords are listed below. 2614b88c807SRodney W. GrimesSome of these keywords are further specified as follows: 2620d632649SJohn Baldwin.Bl -tag -width lockname 263287d1861SRuslan Ermilov.It Cm %cpu 264287d1861SRuslan ErmilovThe CPU utilization of the process; this is a decaying average over up to 2654b88c807SRodney W. Grimesa minute of previous (real) time. 2664b88c807SRodney W. GrimesSince the time base over which this is computed varies (since processes may 2674b88c807SRodney W. Grimesbe very young) it is possible for the sum of all 268287d1861SRuslan Ermilov.Cm %cpu 2694b88c807SRodney W. Grimesfields to exceed 100%. 270287d1861SRuslan Ermilov.It Cm %mem 2714b88c807SRodney W. GrimesThe percentage of real memory used by this process. 272287d1861SRuslan Ermilov.It Cm flags 273c01bf97cSSujal PatelThe flags associated with the process as in 2744b88c807SRodney W. Grimesthe include file 275fe08efe6SRuslan Ermilov.In sys/proc.h : 276bcf85d67SColin Percival.Bl -column P_STOPPED_SINGLE 0x4000000 277c01bf97cSSujal Patel.It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock" 278c01bf97cSSujal Patel.It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal" 279bcf85d67SColin Percival.It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread" 280bcf85d67SColin Percival.It Dv "P_NOLOAD" Ta No "0x00008 Ignore during load avg calculations" 281c01bf97cSSujal Patel.It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" 282c01bf97cSSujal Patel.It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" 283bcf85d67SColin Percival.It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" 284c01bf97cSSujal Patel.It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec" 285c01bf97cSSujal Patel.It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping" 286bcf85d67SColin Percival.It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait" 287c01bf97cSSujal Patel.It Dv "P_TRACED" Ta No "0x00800 Debugged process being traced" 288bcf85d67SColin Percival.It Dv "P_WAITED" Ta No "0x01000 Someone is waiting for us" 289c01bf97cSSujal Patel.It Dv "P_WEXIT" Ta No "0x02000 Working on exiting" 290c01bf97cSSujal Patel.It Dv "P_EXEC" Ta No "0x04000 Process called exec" 291bcf85d67SColin Percival.It Dv "P_SA" Ta No "0x08000 Using scheduler activations" 292bcf85d67SColin Percival.It Dv "P_CONTINUED" Ta No "0x10000 Proc has continued from a stopped state" 293bcf85d67SColin Percival.It Dv "P_STOPPED_SIG" Ta No "0x20000 Stopped due to SIGSTOP/SIGTSTP" 294bcf85d67SColin Percival.It Dv "P_STOPPED_TRACE" Ta No "0x40000 Stopped because of tracing" 295bcf85d67SColin Percival.It Dv "P_STOPPED_SINGLE" Ta No "0x80000 Only one thread can continue" 296bcf85d67SColin Percival.It Dv "P_PROTECTED" Ta No "0x100000 Do not kill on memory overcommit" 297bcf85d67SColin Percival.It Dv "P_SIGEVENT" Ta No "0x200000 Process pending signals changed" 298bcf85d67SColin Percival.It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" 299bcf85d67SColin Percival.It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" 3004b88c807SRodney W. Grimes.El 301287d1861SRuslan Ermilov.It Cm label 3022af538ebSRobert WatsonThe MAC label of the process. 303287d1861SRuslan Ermilov.It Cm lim 3044b88c807SRodney W. GrimesThe soft limit on memory used, specified via a call to 3054b88c807SRodney W. Grimes.Xr setrlimit 2 . 306287d1861SRuslan Ermilov.It Cm lstart 307287d1861SRuslan ErmilovThe exact time the command started, using the 308287d1861SRuslan Ermilov.Ql %c 309287d1861SRuslan Ermilovformat described in 3104b88c807SRodney W. Grimes.Xr strftime 3 . 311287d1861SRuslan Ermilov.It Cm lockname 3120d632649SJohn BaldwinThe name of the lock that the process is currently blocked on. 3139b67ac59SJohn BaldwinIf the name is invalid or unknown, then 31412e720d7SRuslan Ermilov.Dq ???\& 3159b67ac59SJohn Baldwinis displayed. 316287d1861SRuslan Ermilov.It Cm mwchan 3170d632649SJohn BaldwinThe event name if the process is blocked normally, or the lock name if 3180d632649SJohn Baldwinthe process is blocked on a lock. 3190d632649SJohn BaldwinSee the wchan and lockname keywords 320d9a5f890SMatthew Dillonfor details. 321287d1861SRuslan Ermilov.It Cm nice 3224b88c807SRodney W. GrimesThe process scheduling increment (see 3234b88c807SRodney W. Grimes.Xr setpriority 2 ) . 324287d1861SRuslan Ermilov.It Cm rss 3254b88c807SRodney W. Grimesthe real memory (resident set) size of the process (in 1024 byte units). 326287d1861SRuslan Ermilov.It Cm start 3274b88c807SRodney W. GrimesThe time the command started. 3284b88c807SRodney W. GrimesIf the command started less than 24 hours ago, the start time is 329287d1861SRuslan Ermilovdisplayed using the 330287d1861SRuslan Ermilov.Dq Li %l:ps.1p 331287d1861SRuslan Ermilovformat described in 3324b88c807SRodney W. Grimes.Xr strftime 3 . 3334b88c807SRodney W. GrimesIf the command started less than 7 days ago, the start time is 334287d1861SRuslan Ermilovdisplayed using the 335287d1861SRuslan Ermilov.Dq Li %a6.15p 336287d1861SRuslan Ermilovformat. 337287d1861SRuslan ErmilovOtherwise, the start time is displayed using the 338287d1861SRuslan Ermilov.Dq Li %e%b%y 339287d1861SRuslan Ermilovformat. 340287d1861SRuslan Ermilov.It Cm state 341a54b88d8SChristian BruefferThe state is given by a sequence of characters, for example, 342287d1861SRuslan Ermilov.Dq Li RWNA . 343a54b88d8SChristian BruefferThe first character indicates the run state of the process: 3444b88c807SRodney W. Grimes.Pp 3454b88c807SRodney W. Grimes.Bl -tag -width indent -compact 346287d1861SRuslan Ermilov.It Li D 3474b88c807SRodney W. GrimesMarks a process in disk (or other short term, uninterruptible) wait. 348287d1861SRuslan Ermilov.It Li I 3494b88c807SRodney W. GrimesMarks a process that is idle (sleeping for longer than about 20 seconds). 350287d1861SRuslan Ermilov.It Li L 3510d632649SJohn BaldwinMarks a process that is waiting to acquire a lock. 352287d1861SRuslan Ermilov.It Li R 3534b88c807SRodney W. GrimesMarks a runnable process. 354287d1861SRuslan Ermilov.It Li S 3554b88c807SRodney W. GrimesMarks a process that is sleeping for less than about 20 seconds. 356287d1861SRuslan Ermilov.It Li T 3574b88c807SRodney W. GrimesMarks a stopped process. 358287d1861SRuslan Ermilov.It Li W 359bcf85d67SColin PercivalMarks an idle interrupt thread. 360287d1861SRuslan Ermilov.It Li Z 361287d1861SRuslan ErmilovMarks a dead process (a 362287d1861SRuslan Ermilov.Dq zombie ) . 3634b88c807SRodney W. Grimes.El 3644b88c807SRodney W. Grimes.Pp 3654b88c807SRodney W. GrimesAdditional characters after these, if any, indicate additional state 3664b88c807SRodney W. Grimesinformation: 3674b88c807SRodney W. Grimes.Pp 3684b88c807SRodney W. Grimes.Bl -tag -width indent -compact 369287d1861SRuslan Ermilov.It Li + 3704b88c807SRodney W. GrimesThe process is in the foreground process group of its control terminal. 371287d1861SRuslan Ermilov.It Li < 372287d1861SRuslan ErmilovThe process has raised CPU scheduling priority. 373287d1861SRuslan Ermilov.It Li E 3744b88c807SRodney W. GrimesThe process is trying to exit. 375287d1861SRuslan Ermilov.It Li J 376bcf85d67SColin PercivalMarks a process which is in 377bcf85d67SColin Percival.Xr jail 2 . 378bcf85d67SColin PercivalThe hostname of the prison can be found in 379287d1861SRuslan Ermilov.Pa /proc/ Ns Ao Ar pid Ac Ns Pa /status . 380287d1861SRuslan Ermilov.It Li L 3814b88c807SRodney W. GrimesThe process has pages locked in core (for example, for raw 3824b88c807SRodney W. Grimes.Tn I/O ) . 383287d1861SRuslan Ermilov.It Li N 384287d1861SRuslan ErmilovThe process has reduced CPU scheduling priority (see 3854b88c807SRodney W. Grimes.Xr setpriority 2 ) . 386287d1861SRuslan Ermilov.It Li s 3874b88c807SRodney W. GrimesThe process is a session leader. 388287d1861SRuslan Ermilov.It Li V 3894b88c807SRodney W. GrimesThe process is suspended during a 390c6e69125SPhilippe Charnier.Xr vfork 2 . 391287d1861SRuslan Ermilov.It Li W 3924b88c807SRodney W. GrimesThe process is swapped out. 393287d1861SRuslan Ermilov.It Li X 3944b88c807SRodney W. GrimesThe process is being traced or debugged. 3954b88c807SRodney W. Grimes.El 396287d1861SRuslan Ermilov.It Cm tt 3974b88c807SRodney W. GrimesAn abbreviation for the pathname of the controlling terminal, if any. 39877027e30SJoseph KoshyThe abbreviation consists of the three letters following 399c9a8d1f4SPhilippe Charnier.Pa /dev/tty , 400287d1861SRuslan Ermilovor, for the console, 401287d1861SRuslan Ermilov.Dq Li con . 402287d1861SRuslan ErmilovThis is followed by a 403287d1861SRuslan Ermilov.Ql - 404287d1861SRuslan Ermilovif the process can no longer reach that 4054b88c807SRodney W. Grimescontrolling terminal (i.e., it has been revoked). 406287d1861SRuslan Ermilov.It Cm wchan 4074b88c807SRodney W. GrimesThe event (an address in the system) on which a process waits. 4084b88c807SRodney W. GrimesWhen printed numerically, the initial part of the address is 4094b88c807SRodney W. Grimestrimmed off and the result is printed in hex, for example, 0x80324000 prints 4104b88c807SRodney W. Grimesas 324000. 4114b88c807SRodney W. Grimes.El 4124b88c807SRodney W. Grimes.Pp 4134b88c807SRodney W. GrimesWhen printing using the command keyword, a process that has exited and 4144b88c807SRodney W. Grimeshas a parent that has not yet waited for the process (in other words, a zombie) 415287d1861SRuslan Ermilovis listed as 416287d1861SRuslan Ermilov.Dq Li <defunct> , 417287d1861SRuslan Ermilovand a process which is blocked while trying 418287d1861SRuslan Ermilovto exit is listed as 419287d1861SRuslan Ermilov.Dq Li <exiting> . 420e4b70e66SGarance A DrosehnIf the command vector cannot be located (usually because it has not 421e4b70e66SGarance A Drosehnbeen set, as is the case of system processes and/or kernel threads) 422e4b70e66SGarance A Drosehnthe command name is printed within square brackets. 423e004acc8SPhilippe CharnierThe 424e004acc8SPhilippe Charnier.Nm 425e004acc8SPhilippe Charnierutility 4264b88c807SRodney W. Grimesmakes an educated guess as to the file name and arguments given when the 4274b88c807SRodney W. Grimesprocess was created by examining memory or the swap area. 4284b88c807SRodney W. GrimesThe method is inherently somewhat unreliable and in any event a process 4294b88c807SRodney W. Grimesis entitled to destroy this information, so the names cannot be depended 4304b88c807SRodney W. Grimeson too much. 4314b88c807SRodney W. GrimesThe ucomm (accounting) keyword can, however, be depended on. 4324b88c807SRodney W. Grimes.Sh KEYWORDS 4334b88c807SRodney W. GrimesThe following is a complete list of the available keywords and their 4344b88c807SRodney W. Grimesmeanings. 4354b88c807SRodney W. GrimesSeveral of them have aliases (keywords which are synonyms). 4364b88c807SRodney W. Grimes.Pp 437287d1861SRuslan Ermilov.Bl -tag -width ".Cm sigignore" -compact 438287d1861SRuslan Ermilov.It Cm %cpu 439287d1861SRuslan Ermilovpercentage CPU usage (alias 440287d1861SRuslan Ermilov.Cm pcpu ) 441287d1861SRuslan Ermilov.It Cm %mem 442287d1861SRuslan Ermilovpercentage memory usage (alias 443287d1861SRuslan Ermilov.Cm pmem ) 444287d1861SRuslan Ermilov.It Cm acflag 445287d1861SRuslan Ermilovaccounting flag (alias 446287d1861SRuslan Ermilov.Cm acflg ) 447287d1861SRuslan Ermilov.It Cm args 44803334017SJuli Mallettcommand and arguments 449287d1861SRuslan Ermilov.It Cm comm 45003334017SJuli Mallettcommand 451287d1861SRuslan Ermilov.It Cm command 45203334017SJuli Mallettcommand and arguments 453287d1861SRuslan Ermilov.It Cm cpu 454287d1861SRuslan Ermilovshort-term CPU usage factor (for scheduling) 455287d1861SRuslan Ermilov.It Cm etime 45676e1a9feSJuli Mallettelapsed running time 457287d1861SRuslan Ermilov.It Cm flags 458287d1861SRuslan Ermilovthe process flags, in hexadecimal (alias 459287d1861SRuslan Ermilov.Cm f ) 460287d1861SRuslan Ermilov.It Cm inblk 461287d1861SRuslan Ermilovtotal blocks read (alias 462287d1861SRuslan Ermilov.Cm inblock ) 463287d1861SRuslan Ermilov.It Cm jobc 4644b88c807SRodney W. Grimesjob control count 465287d1861SRuslan Ermilov.It Cm ktrace 4664b88c807SRodney W. Grimestracing flags 467287d1861SRuslan Ermilov.It Cm label 4682af538ebSRobert WatsonMAC label 469287d1861SRuslan Ermilov.It Cm lim 4704b88c807SRodney W. Grimesmemoryuse limit 471287d1861SRuslan Ermilov.It Cm logname 4724b88c807SRodney W. Grimeslogin name of user who started the process 473287d1861SRuslan Ermilov.It Cm lstart 4744b88c807SRodney W. Grimestime started 475287d1861SRuslan Ermilov.It Cm majflt 4764b88c807SRodney W. Grimestotal page faults 477287d1861SRuslan Ermilov.It Cm minflt 4784b88c807SRodney W. Grimestotal page reclaims 479287d1861SRuslan Ermilov.It Cm msgrcv 4804b88c807SRodney W. Grimestotal messages received (reads from pipes/sockets) 481287d1861SRuslan Ermilov.It Cm msgsnd 4824b88c807SRodney W. Grimestotal messages sent (writes on pipes/sockets) 483287d1861SRuslan Ermilov.It Cm lockname 4840d632649SJohn Baldwinlock currently blocked on (as a symbolic name) 485287d1861SRuslan Ermilov.It Cm mwchan 4860d632649SJohn Baldwinwait channel or lock currently blocked on 487287d1861SRuslan Ermilov.It Cm nice 488287d1861SRuslan Ermilovnice value (alias 489287d1861SRuslan Ermilov.Cm ni ) 490287d1861SRuslan Ermilov.It Cm nivcsw 4914b88c807SRodney W. Grimestotal involuntary context switches 492287d1861SRuslan Ermilov.It Cm nsigs 493287d1861SRuslan Ermilovtotal signals taken (alias 494287d1861SRuslan Ermilov.Cm nsignals ) 495287d1861SRuslan Ermilov.It Cm nswap 4964b88c807SRodney W. Grimestotal swaps in/out 497287d1861SRuslan Ermilov.It Cm nvcsw 4984b88c807SRodney W. Grimestotal voluntary context switches 499287d1861SRuslan Ermilov.It Cm nwchan 5004b88c807SRodney W. Grimeswait channel (as an address) 501287d1861SRuslan Ermilov.It Cm oublk 502287d1861SRuslan Ermilovtotal blocks written (alias 503287d1861SRuslan Ermilov.Cm oublock ) 504287d1861SRuslan Ermilov.It Cm paddr 5054b88c807SRodney W. Grimesswap address 506287d1861SRuslan Ermilov.It Cm pagein 5074b88c807SRodney W. Grimespageins (same as majflt) 508287d1861SRuslan Ermilov.It Cm pgid 5094b88c807SRodney W. Grimesprocess group number 510287d1861SRuslan Ermilov.It Cm pid 511287d1861SRuslan Ermilovprocess ID 512287d1861SRuslan Ermilov.It Cm poip 5134b88c807SRodney W. Grimespageouts in progress 514287d1861SRuslan Ermilov.It Cm ppid 515287d1861SRuslan Ermilovparent process ID 516287d1861SRuslan Ermilov.It Cm pri 5174b88c807SRodney W. Grimesscheduling priority 518287d1861SRuslan Ermilov.It Cm re 5194b88c807SRodney W. Grimescore residency time (in seconds; 127 = infinity) 520287d1861SRuslan Ermilov.It Cm rgid 521287d1861SRuslan Ermilovreal group ID 522287d1861SRuslan Ermilov.It Cm rgroup 523e8eef4bbSJuli Mallettgroup name (from rgid) 524287d1861SRuslan Ermilov.It Cm rlink 5254b88c807SRodney W. Grimesreverse link on run queue, or 0 526287d1861SRuslan Ermilov.It Cm rss 5274b88c807SRodney W. Grimesresident set size 528287d1861SRuslan Ermilov.It Cm rtprio 529a837235aSDavid Greenmanrealtime priority (101 = not a realtime process) 530287d1861SRuslan Ermilov.It Cm ruid 531287d1861SRuslan Ermilovreal user ID 532287d1861SRuslan Ermilov.It Cm ruser 5334b88c807SRodney W. Grimesuser name (from ruid) 534287d1861SRuslan Ermilov.It Cm sid 535287d1861SRuslan Ermilovsession ID 536287d1861SRuslan Ermilov.It Cm sig 537287d1861SRuslan Ermilovpending signals (alias 538287d1861SRuslan Ermilov.Cm pending ) 539287d1861SRuslan Ermilov.It Cm sigcatch 540287d1861SRuslan Ermilovcaught signals (alias 541287d1861SRuslan Ermilov.Cm caught ) 542287d1861SRuslan Ermilov.It Cm sigignore 543287d1861SRuslan Ermilovignored signals (alias 544287d1861SRuslan Ermilov.Cm ignored ) 545287d1861SRuslan Ermilov.It Cm sigmask 546287d1861SRuslan Ermilovblocked signals (alias 547287d1861SRuslan Ermilov.Cm blocked ) 548287d1861SRuslan Ermilov.It Cm sl 5494b88c807SRodney W. Grimessleep time (in seconds; 127 = infinity) 550287d1861SRuslan Ermilov.It Cm start 5514b88c807SRodney W. Grimestime started 552287d1861SRuslan Ermilov.It Cm state 553287d1861SRuslan Ermilovsymbolic process state (alias 554287d1861SRuslan Ermilov.Cm stat ) 555287d1861SRuslan Ermilov.It Cm svgid 5564b88c807SRodney W. Grimessaved gid from a setgid executable 557287d1861SRuslan Ermilov.It Cm svuid 558287d1861SRuslan Ermilovsaved UID from a setuid executable 559287d1861SRuslan Ermilov.It Cm tdev 5604b88c807SRodney W. Grimescontrol terminal device number 561287d1861SRuslan Ermilov.It Cm time 562287d1861SRuslan Ermilovaccumulated CPU time, user + system (alias 563287d1861SRuslan Ermilov.Cm cputime ) 564287d1861SRuslan Ermilov.It Cm tpgid 565287d1861SRuslan Ermilovcontrol terminal process group ID 566287d1861SRuslan Ermilov.\".It Cm trss 5674b88c807SRodney W. Grimes.\"text resident set size (in Kbytes) 568287d1861SRuslan Ermilov.It Cm tsid 569287d1861SRuslan Ermilovcontrol terminal session ID 570287d1861SRuslan Ermilov.It Cm tsiz 5714b88c807SRodney W. Grimestext size (in Kbytes) 572287d1861SRuslan Ermilov.It Cm tt 5734b88c807SRodney W. Grimescontrol terminal name (two letter abbreviation) 574287d1861SRuslan Ermilov.It Cm tty 5754b88c807SRodney W. Grimesfull name of control terminal 576287d1861SRuslan Ermilov.It Cm uprocp 5774b88c807SRodney W. Grimesprocess pointer 578287d1861SRuslan Ermilov.It Cm ucomm 5794b88c807SRodney W. Grimesname to be used for accounting 580287d1861SRuslan Ermilov.It Cm uid 581287d1861SRuslan Ermiloveffective user ID 582287d1861SRuslan Ermilov.It Cm upr 583287d1861SRuslan Ermilovscheduling priority on return from system call (alias 584287d1861SRuslan Ermilov.Cm usrpri ) 585287d1861SRuslan Ermilov.It Cm user 586287d1861SRuslan Ermilovuser name (from UID) 587287d1861SRuslan Ermilov.It Cm vsz 588287d1861SRuslan Ermilovvirtual size in Kbytes (alias 589287d1861SRuslan Ermilov.Cm vsize ) 590287d1861SRuslan Ermilov.It Cm wchan 5914b88c807SRodney W. Grimeswait channel (as a symbolic name) 592287d1861SRuslan Ermilov.It Cm xstat 5934b88c807SRodney W. Grimesexit or stop status (valid only for stopped or zombie process) 5944b88c807SRodney W. Grimes.El 5954f18100dSTim J. Robbins.Sh ENVIRONMENT 5964f18100dSTim J. RobbinsThe following environment variables affect the execution of 5974f18100dSTim J. Robbins.Nm : 5984f18100dSTim J. Robbins.Bl -tag -width ".Ev COLUMNS" 5994f18100dSTim J. Robbins.It Ev COLUMNS 6004f18100dSTim J. RobbinsIf set, specifies the user's preferred output width in column positions. 6014f18100dSTim J. RobbinsBy default, 6024f18100dSTim J. Robbins.Nm 6034f18100dSTim J. Robbinsattempts to automatically determine the terminal width. 6044f18100dSTim J. Robbins.El 6054b88c807SRodney W. Grimes.Sh FILES 606cd31922fSRuslan Ermilov.Bl -tag -width ".Pa /boot/kernel/kernel" -compact 6071063e126SJosef Karthauser.It Pa /boot/kernel/kernel 6084b88c807SRodney W. Grimesdefault system namelist 6091c0c7731SJoerg Wunsch.It Pa /proc 6101c0c7731SJoerg Wunschthe mount point of 6111c0c7731SJoerg Wunsch.Xr procfs 5 6124b88c807SRodney W. Grimes.El 6134b88c807SRodney W. Grimes.Sh SEE ALSO 6144b88c807SRodney W. Grimes.Xr kill 1 , 615585bf557SGarance A Drosehn.Xr pgrep 1 , 616585bf557SGarance A Drosehn.Xr pkill 1 , 6174b88c807SRodney W. Grimes.Xr w 1 , 6184b88c807SRodney W. Grimes.Xr kvm 3 , 6194b88c807SRodney W. Grimes.Xr strftime 3 , 620ac06cb0aSRobert Watson.Xr mac 4 , 621b5f82180SRuslan Ermilov.Xr procfs 5 , 6229b67ac59SJohn Baldwin.Xr pstat 8 , 6236b821228SDima Dorfman.Xr sysctl 8 , 6249b67ac59SJohn Baldwin.Xr mutex 9 625a4c8a745SGarance A Drosehn.Sh STANDARDS 626a4c8a745SGarance A DrosehnFor historical reasons, 627a4c8a745SGarance A Drosehn.Nm 628a4c8a745SGarance A Drosehnutility under 629a4c8a745SGarance A Drosehn.Fx 630a4c8a745SGarance A Drosehnsupports a different set of options from what is described by 631a4c8a745SGarance A Drosehn.St -p1003.2 , 632287d1861SRuslan Ermilovand what is supported on 633287d1861SRuslan Ermilov.No non- Ns Bx 634287d1861SRuslan Ermilovoperating systems. 635a13d4e42SJuli Mallett.Sh HISTORY 636a13d4e42SJuli MallettThe 637a13d4e42SJuli Mallett.Nm 638a13d4e42SJuli Mallettcommand appeared in 6397140a0e9SJuli Mallett.At v4 . 6404b88c807SRodney W. Grimes.Sh BUGS 6414b88c807SRodney W. GrimesSince 642c9a8d1f4SPhilippe Charnier.Nm 6434b88c807SRodney W. Grimescannot run faster than the system and is run as any other scheduled 6444b88c807SRodney W. Grimesprocess, the information it displays can never be exact. 645b59ca660STim J. Robbins.Pp 646b59ca660STim J. RobbinsThe 647b59ca660STim J. Robbins.Nm 648b59ca660STim J. Robbinsutility does not correctly display argument lists containing multibyte 649b59ca660STim J. Robbinscharacters. 650