1b8135ed6SMateusz Piotrowski.Dd November 18, 2021 29d6cce02SEitan Adler.Dt TOP 1 39d6cce02SEitan Adler.Os 49d6cce02SEitan Adler.Sh NAME 59d6cce02SEitan Adler.Nm top 69d6cce02SEitan Adler.Nd display and update information about the top cpu processes 79d6cce02SEitan Adler.Sh SYNOPSIS 89d6cce02SEitan Adler.Nm 911253904SMateusz Piotrowski.Op Fl abCHIijnPpqSTtuvxz 109d6cce02SEitan Adler.Op Fl d Ar count 1111253904SMateusz Piotrowski.Op Fl J Ar jail 12c947fc5fSMateusz Piotrowski.Op Fl m Ar mode 139d6cce02SEitan Adler.Op Fl o Ar field 149d6cce02SEitan Adler.Op Fl p Ar pid 1511253904SMateusz Piotrowski.Op Fl s Ar time 1611253904SMateusz Piotrowski.Op Fl U Ar uid 171a444441SDimitry Andric.Op Ar number 189d6cce02SEitan Adler.Sh DESCRIPTION 199d6cce02SEitan Adler.Nm 203be6ef06SEitan Adlerdisplays the top 213be6ef06SEitan Adlerprocesses on the system and periodically updates this information. 223be6ef06SEitan AdlerIf standard output is an intelligent terminal (see below) then 233be6ef06SEitan Adleras many processes as will fit on the terminal screen are displayed 249d6cce02SEitan Adlerby default. 259d6cce02SEitan AdlerOtherwise, a good number of them are shown (around 20). 269d6cce02SEitan AdlerRaw cpu percentage is used to rank the processes. 279d6cce02SEitan AdlerIf 289d6cce02SEitan Adler.Ar number 293be6ef06SEitan Adleris given, then the top 309d6cce02SEitan Adler.Ar number 313be6ef06SEitan Adlerprocesses will be displayed instead of the default. 329d6cce02SEitan Adler.Pp 339d6cce02SEitan Adler.Nm 343be6ef06SEitan Adlermakes a distinction between terminals that support advanced capabilities 359d6cce02SEitan Adlerand those that do not. 369d6cce02SEitan AdlerThis distinction affects the choice of defaults for certain options. 37*01e31405SMateusz PiotrowskiIn the remainder of this document, an 38*01e31405SMateusz Piotrowski.Dq intelligent 39*01e31405SMateusz Piotrowskiterminal is one that 403be6ef06SEitan Adlersupports cursor addressing, clear screen, and clear to end of line. 41*01e31405SMateusz PiotrowskiConversely, a 42*01e31405SMateusz Piotrowski.Dq dumb 43*01e31405SMateusz Piotrowskiterminal is one that does not support such 449d6cce02SEitan Adlerfeatures. 459d6cce02SEitan AdlerIf the output of 469d6cce02SEitan Adler.Nm 473be6ef06SEitan Adleris redirected to a file, it acts as if it were being run on a dumb 483be6ef06SEitan Adlerterminal. 4911253904SMateusz Piotrowski.Pp 5011253904SMateusz PiotrowskiThe options are as follows: 5111253904SMateusz Piotrowski.Bl -tag -width indent 529d6cce02SEitan Adler.It Fl a 533be6ef06SEitan AdlerDisplay command names derived from the argv[] vector, rather than real 549d6cce02SEitan Adlerexecutable name. 559d6cce02SEitan AdlerIt it useful when you want to watch applications, that 569d6cce02SEitan Adlerputs their status information there. 579d6cce02SEitan AdlerIf the real name differs from argv[0], 583be6ef06SEitan Adlerit will be displayed in parenthesis. 59ecc2b89fSHiroki SatoNon-printable characters in the command line are 60ecc2b89fSHiroki Satoencoded in C-style backslash sequences or 61ecc2b89fSHiroki Satoa three digit octal sequences. 629d6cce02SEitan Adler.It Fl b 63*01e31405SMateusz PiotrowskiUse 64*01e31405SMateusz Piotrowski.Dq batch 65*01e31405SMateusz Piotrowskimode. 669d6cce02SEitan AdlerIn this mode, all input from the terminal is 679d6cce02SEitan Adlerignored. 689d6cce02SEitan AdlerInterrupt characters (such as ^C and ^\e) still have an effect. 693be6ef06SEitan AdlerThis is the default on a dumb terminal, or when the output is not a terminal. 7011253904SMateusz Piotrowski.It Fl C 7111253904SMateusz PiotrowskiToggle CPU display mode. 7211253904SMateusz PiotrowskiBy default top displays the weighted CPU percentage in the WCPU column 7311253904SMateusz Piotrowski(this is the same value that 7411253904SMateusz Piotrowski.Xr ps 1 7511253904SMateusz Piotrowskidisplays as CPU). 7611253904SMateusz PiotrowskiEach time 7711253904SMateusz Piotrowski.Fl C 78*01e31405SMateusz Piotrowskiflag is passed it toggles between 79*01e31405SMateusz Piotrowski.Dq raw cpu 80*01e31405SMateusz Piotrowskimode and 81*01e31405SMateusz Piotrowski.Dq weighted cpu 82*01e31405SMateusz Piotrowskimode, showing the 83*01e31405SMateusz Piotrowski.Dq CPU 84*01e31405SMateusz Piotrowskior the 85*01e31405SMateusz Piotrowski.Dq WCPU 86*01e31405SMateusz Piotrowskicolumn respectively. 8711253904SMateusz Piotrowski.It Fl d Ar count 8811253904SMateusz PiotrowskiShow only 8911253904SMateusz Piotrowski.Ar count 9011253904SMateusz Piotrowskidisplays, then exit. 9111253904SMateusz PiotrowskiA display is considered to be one update of the 9211253904SMateusz Piotrowskiscreen. 9311253904SMateusz PiotrowskiThe default is 1 for dumb terminals. 9411253904SMateusz PiotrowskiNote that for 9511253904SMateusz Piotrowski.Ar count 9611253904SMateusz Piotrowski= 1 9711253904SMateusz Piotrowskino information is available about the percentage of time spent by the CPU in every state. 989d6cce02SEitan Adler.It Fl H 993be6ef06SEitan AdlerDisplay each thread for a multithreaded process individually. 1003be6ef06SEitan AdlerBy default a single summary line is displayed for each process. 10111253904SMateusz Piotrowski.It Fl I 10211253904SMateusz PiotrowskiDo not display idle processes. 10311253904SMateusz PiotrowskiBy default, top displays both active and idle processes. 1049d6cce02SEitan Adler.It Fl i 105*01e31405SMateusz PiotrowskiUse 106*01e31405SMateusz Piotrowski.Dq interactive 107*01e31405SMateusz Piotrowskimode. 1089d6cce02SEitan AdlerIn this mode, any input is immediately 1099d6cce02SEitan Adlerread for processing. 110*01e31405SMateusz PiotrowskiSee the section on 111*01e31405SMateusz Piotrowski.Dq Interactive Mode 1123be6ef06SEitan Adlerfor an explanation of 1139d6cce02SEitan Adlerwhich keys perform what functions. 1149d6cce02SEitan AdlerAfter the command is processed, the 1153be6ef06SEitan Adlerscreen will immediately be updated, even if the command was not 1169d6cce02SEitan Adlerunderstood. 1179d6cce02SEitan AdlerThis mode is the default when standard output is an 1183be6ef06SEitan Adlerintelligent terminal. 11911253904SMateusz Piotrowski.It Fl J Ar jail 12011253904SMateusz PiotrowskiShow only those processes owned by 12111253904SMateusz Piotrowski.Ar jail . 12211253904SMateusz PiotrowskiThis may be either the 12311253904SMateusz Piotrowski.Ar jid 12411253904SMateusz Piotrowskior 12511253904SMateusz Piotrowski.Ar name 12611253904SMateusz Piotrowskiof the jail. 12711253904SMateusz PiotrowskiUse 12811253904SMateusz Piotrowski0 12911253904SMateusz Piotrowskito limit to host processes. 13011253904SMateusz PiotrowskiUsing this option implies 13111253904SMateusz Piotrowski.Fl j . 1329d6cce02SEitan Adler.It Fl j 1333be6ef06SEitan AdlerDisplay the 1349d6cce02SEitan Adler.Xr jail 8 1353be6ef06SEitan AdlerID. 136c947fc5fSMateusz Piotrowski.It Fl m Ar mode 137c947fc5fSMateusz PiotrowskiDisplay statistics in the specified 138c947fc5fSMateusz Piotrowski.Ar mode . 139c947fc5fSMateusz PiotrowskiAvailable modes are 140c947fc5fSMateusz Piotrowski.Cm cpu 141c947fc5fSMateusz Piotrowskiand 142c947fc5fSMateusz Piotrowski.Cm io . 143c947fc5fSMateusz PiotrowskiDefault is 144c947fc5fSMateusz Piotrowski.Cm cpu . 1459d6cce02SEitan Adler.It Fl n 146*01e31405SMateusz PiotrowskiUse 147*01e31405SMateusz Piotrowski.Dq non-interactive 148*01e31405SMateusz Piotrowskimode. 149*01e31405SMateusz PiotrowskiThis is identical to 150*01e31405SMateusz Piotrowski.Dq batch 1513be6ef06SEitan Adlermode. 15211253904SMateusz Piotrowski.It Fl o Ar field 15311253904SMateusz PiotrowskiSort the process display area on the specified field. 15411253904SMateusz PiotrowskiThe field name 15511253904SMateusz Piotrowskiis the name of the column as seen in the output, but in lower case: 156*01e31405SMateusz Piotrowski.Dq cpu , 157*01e31405SMateusz Piotrowski.Dq size , 158*01e31405SMateusz Piotrowski.Dq res , 159*01e31405SMateusz Piotrowski.Dq time , 160*01e31405SMateusz Piotrowski.Dq pri , 161*01e31405SMateusz Piotrowski.Dq threads , 162*01e31405SMateusz Piotrowski.Dq total , 163*01e31405SMateusz Piotrowski.Dq read , 164*01e31405SMateusz Piotrowski.Dq write , 165*01e31405SMateusz Piotrowski.Dq fault , 166*01e31405SMateusz Piotrowski.Dq vcsw , 167*01e31405SMateusz Piotrowski.Dq ivcsw , 168*01e31405SMateusz Piotrowski.Dq jid , 169*01e31405SMateusz Piotrowski.Dq swap , 170*01e31405SMateusz Piotrowskior 171*01e31405SMateusz Piotrowski.Dq pid . 1729d6cce02SEitan Adler.It Fl P 1733be6ef06SEitan AdlerDisplay per-cpu CPU usage statistics. 17411253904SMateusz Piotrowski.It Fl p Ar pid 17511253904SMateusz PiotrowskiShow only the process 17611253904SMateusz Piotrowski.Ar pid . 1779d6cce02SEitan Adler.It Fl q 1783be6ef06SEitan AdlerRenice 1799d6cce02SEitan Adler.Nm 1809d6cce02SEitan Adlerto -20 so that it will run faster. 1819d6cce02SEitan AdlerThis can be used when the system is 1823be6ef06SEitan Adlerbeing very sluggish to improve the possibility of discovering the problem. 1833be6ef06SEitan AdlerThis option can only be used by root. 18411253904SMateusz Piotrowski.It Fl S 18511253904SMateusz PiotrowskiShow system processes in the display. 18611253904SMateusz PiotrowskiNormally, system processes such as the pager and the swapper are not shown. 18711253904SMateusz PiotrowskiThis option makes them visible. 18811253904SMateusz Piotrowski.It Fl s Ar time 18911253904SMateusz PiotrowskiSet the delay between screen updates to 19011253904SMateusz Piotrowski.Ar time 19111253904SMateusz Piotrowskiseconds, which may be fractional. 19211253904SMateusz PiotrowskiThe default delay between updates is 1 second. 19311253904SMateusz Piotrowski.It Fl T 19411253904SMateusz PiotrowskiToggle displaying thread ID (tid) instead of process id (pid). 19511253904SMateusz Piotrowski.It Fl t 19611253904SMateusz PiotrowskiDo not display the 19711253904SMateusz Piotrowski.Nm 19811253904SMateusz Piotrowskiprocess itself. 19911253904SMateusz Piotrowski.It Fl U Ar username 20011253904SMateusz PiotrowskiShow only those processes owned by 20111253904SMateusz Piotrowski.Ar username . 20211253904SMateusz PiotrowskiThis option currently only accepts usernames and will not understand 20311253904SMateusz Piotrowskiuid numbers. 2049d6cce02SEitan Adler.It Fl u 2059d6cce02SEitan AdlerDo not map uid numbers to usernames. 2069d6cce02SEitan AdlerNormally, 2079d6cce02SEitan Adler.Nm 208*01e31405SMateusz Piotrowskiwill read as much of the file 209*01e31405SMateusz Piotrowski.Pa /etc/passwd 210*01e31405SMateusz Piotrowskias is necessary to map 2119d6cce02SEitan Adlerall the user id numbers it encounters into login names. 2129d6cce02SEitan AdlerThis option disables all that, while possibly decreasing execution time. 2139d6cce02SEitan AdlerThe uid numbers are displayed instead of the names. 2149d6cce02SEitan Adler.It Fl v 2153be6ef06SEitan AdlerWrite version number information to stderr then exit immediately. 2169d6cce02SEitan Adler.It Fl w 2173be6ef06SEitan AdlerDisplay approximate swap usage for each process. 2189d6cce02SEitan Adler.It Fl z 2193be6ef06SEitan AdlerDo not display the system idle process. 2209d6cce02SEitan Adler.El 2219d6cce02SEitan Adler.Pp 2223be6ef06SEitan AdlerBoth 2239d6cce02SEitan Adler.Ar count 2243be6ef06SEitan Adlerand 2259d6cce02SEitan Adler.Ar number 226*01e31405SMateusz Piotrowskifields can be specified as 227*01e31405SMateusz Piotrowski.Dq infinite , 228*01e31405SMateusz Piotrowskiindicating that they can 2299d6cce02SEitan Adlerstretch as far as possible. 2309d6cce02SEitan AdlerThis is accomplished by using any proper 2313be6ef06SEitan Adlerprefix of the keywords 232*01e31405SMateusz Piotrowski.Dq infinity , 233*01e31405SMateusz Piotrowski.Dq maximum , 2343be6ef06SEitan Adleror 235*01e31405SMateusz Piotrowski.Dq all . 2369d6cce02SEitan AdlerBoolean flags are toggles. 2379d6cce02SEitan AdlerA second specification of any of these options will negate the first. 2389d6cce02SEitan Adler.Sh "INTERACTIVE MODE" 2393be6ef06SEitan AdlerWhen 2409d6cce02SEitan Adler.Nm 241*01e31405SMateusz Piotrowskiis running in 242*01e31405SMateusz Piotrowski.Dq interactive mode , 243*01e31405SMateusz Piotrowskiit reads commands from the 2449d6cce02SEitan Adlerterminal and acts upon them accordingly. 2459d6cce02SEitan AdlerIn this mode, the terminal is 246*01e31405SMateusz Piotrowskiput in 247*01e31405SMateusz Piotrowski.Dq CBREAK , 248*01e31405SMateusz Piotrowskiso that a character will be 2499d6cce02SEitan Adlerprocessed as soon as it is typed. 2509d6cce02SEitan AdlerAlmost always, a key will be 2513be6ef06SEitan Adlerpressed when 2529d6cce02SEitan Adler.Nm 2533be6ef06SEitan Adleris between displays; that is, while it is waiting for 2549d6cce02SEitan Adler.Ar time 2559d6cce02SEitan Adlerseconds to elapse. 2569d6cce02SEitan AdlerIf this is the case, the command will be 2573be6ef06SEitan Adlerprocessed and the display will be updated immediately thereafter 2589d6cce02SEitan Adler(reflecting any changes that the command may have specified). 2599d6cce02SEitan AdlerThis 2609d6cce02SEitan Adlerhappens even if the command was incorrect. 2619d6cce02SEitan AdlerIf a key is pressed while 2629d6cce02SEitan Adler.Nm 2633be6ef06SEitan Adleris in the middle of updating the display, it will finish the update and 2649d6cce02SEitan Adlerthen process the command. 2659d6cce02SEitan AdlerSome commands require additional information, 2669d6cce02SEitan Adlerand the user will be prompted accordingly. 2679d6cce02SEitan AdlerWhile typing this information 2683be6ef06SEitan Adlerin, the user's erase and kill keys (as set up by the command 2699d6cce02SEitan Adler.Xr stty 1 ) 2703be6ef06SEitan Adlerare recognized, and a newline terminates the input. 2719d6cce02SEitan Adler.Pp 2723be6ef06SEitan AdlerThese commands are currently recognized (^L refers to control-L): 2739d6cce02SEitan Adler.Bl -tag -width indent 2749d6cce02SEitan Adler.It ^L 2753be6ef06SEitan AdlerRedraw the screen. 2769d6cce02SEitan Adler.It h 2779d6cce02SEitan AdlerDisplay a summary of the commands (help screen). 2789d6cce02SEitan AdlerVersion information 2793be6ef06SEitan Adleris included in this display. 2809d6cce02SEitan Adler.It q 2813be6ef06SEitan AdlerQuit 2829d6cce02SEitan Adler.Nm 2839d6cce02SEitan Adler.It d 2843be6ef06SEitan AdlerChange the number of displays to show (prompt for new number). 28511253904SMateusz PiotrowskiRemember that the next display counts as one, so typing 'd1' will make 2869d6cce02SEitan Adler.Nm 2873be6ef06SEitan Adlershow one final display and then immediately exit. 288a00d703fSJohn Grafton.It / 289a00d703fSJohn GraftonDisplay only processes that contain the specified string in their 290a00d703fSJohn Graftoncommand name. 291a00d703fSJohn GraftonIf displaying arguments is enabled, the arguments are searched 292a00d703fSJohn Graftontoo. '+' shows all processes. 2939d6cce02SEitan Adler.It m 2943be6ef06SEitan AdlerToggle the display between 'cpu' and 'io' modes. 2959d6cce02SEitan Adler.It n or # 2963be6ef06SEitan AdlerChange the number of processes to display (prompt for new number). 2979d6cce02SEitan Adler.It s 2983be6ef06SEitan AdlerChange the number of seconds to delay between displays 2993be6ef06SEitan Adler(prompt for new number). 3009d6cce02SEitan Adler.It S 3013be6ef06SEitan AdlerToggle the display of system processes. 3029d6cce02SEitan Adler.It a 3033be6ef06SEitan AdlerToggle the display of process titles. 3049d6cce02SEitan Adler.It k 305*01e31405SMateusz PiotrowskiSend a signal 306*01e31405SMateusz Piotrowski.Pq SIGKILL by default 307*01e31405SMateusz Piotrowskito a list of processes. 3083be6ef06SEitan AdlerThis acts similarly to the command 3099d6cce02SEitan Adler.Xr kill 1 . 3109d6cce02SEitan Adler.It r 311*01e31405SMateusz PiotrowskiChange the priority 312*01e31405SMateusz Piotrowski.Pq the Dq nice 313*01e31405SMateusz Piotrowskiof a list of processes. 3149d6cce02SEitan AdlerThis acts similarly to 3159d6cce02SEitan Adler.Xr renice 8 . 3169d6cce02SEitan Adler.It u 3173be6ef06SEitan AdlerDisplay only processes owned by a specific set of usernames (prompt for 3189d6cce02SEitan Adlerusername). 319*01e31405SMateusz PiotrowskiIf the username specified is simply 320*01e31405SMateusz Piotrowski.Dq + 321*01e31405SMateusz Piotrowskior 322*01e31405SMateusz Piotrowski.Dq - , 3239d6cce02SEitan Adlerthen processes belonging to all users will be displayed. 3249d6cce02SEitan AdlerUsernames can be added 325*01e31405SMateusz Piotrowskito and removed from the set by prepending them with 326*01e31405SMateusz Piotrowski.Dq + 327*01e31405SMateusz Piotrowskiand 328*01e31405SMateusz Piotrowski.Dq - , 329*01e31405SMateusz Piotrowskirespectively. 3309d6cce02SEitan Adler.It o 3319d6cce02SEitan AdlerChange the order in which the display is sorted. 3329d6cce02SEitan AdlerThe sort key names include 333*01e31405SMateusz Piotrowski.Dq cpu , 334*01e31405SMateusz Piotrowski.Dq res , 335*01e31405SMateusz Piotrowski.Dq size , 336*01e31405SMateusz Piotrowskiand 337*01e31405SMateusz Piotrowski.Dq time. 3389d6cce02SEitan AdlerThe default is cpu. 3399d6cce02SEitan Adler.It p 34051b29cb7SRoman BogorodskiyDisplay a specific process (prompt for pid). 341*01e31405SMateusz PiotrowskiIf the pid specified is simply 342*01e31405SMateusz Piotrowski.Dq + , 343*01e31405SMateusz Piotrowskithen show all processes. 3449d6cce02SEitan Adler.It e 3453be6ef06SEitan AdlerDisplay a list of system errors (if any) generated by the last 3463be6ef06SEitan Adlercommand. 347b8135ed6SMateusz Piotrowski.It H 3483be6ef06SEitan AdlerToggle the display of threads. 3499d6cce02SEitan Adler.It i or I 3503be6ef06SEitan AdlerToggle the display of idle processes. 3519d6cce02SEitan Adler.It j 3523be6ef06SEitan AdlerToggle the display of 3539d6cce02SEitan Adler.Xr jail 8 3543be6ef06SEitan AdlerID. 3559d6cce02SEitan Adler.It J 3563be6ef06SEitan AdlerDisplay only processes owned by a specific jail (prompt for jail). 357*01e31405SMateusz PiotrowskiIf the jail specified is simply 358*01e31405SMateusz Piotrowski.Dq + , 359*01e31405SMateusz Piotrowskithen processes belonging 3603be6ef06SEitan Adlerto all jails and the host will be displayed. 3613be6ef06SEitan AdlerThis will also enable the display of JID. 3629d6cce02SEitan Adler.It P 3633be6ef06SEitan AdlerToggle the display of per-CPU statistics. 3649d6cce02SEitan Adler.It T 3659d6cce02SEitan AdlerToggle display of TID and PID 3669d6cce02SEitan Adler.It t 3673be6ef06SEitan AdlerToggle the display of the 3689d6cce02SEitan Adler.Nm 3693be6ef06SEitan Adlerprocess. 3709d6cce02SEitan Adler.It w 3713be6ef06SEitan AdlerToggle the display of swap usage. 3729d6cce02SEitan Adler.It z 3733be6ef06SEitan AdlerToggle the display of the system idle process. 3749d6cce02SEitan Adler.El 3759d6cce02SEitan Adler.Sh "THE DISPLAY" 3763be6ef06SEitan AdlerThe top few lines of the display show general information 3773be6ef06SEitan Adlerabout the state of the system, including 3783be6ef06SEitan Adlerthe last process id assigned to a process (on most systems), 3793be6ef06SEitan Adlerthe three load averages, 3803be6ef06SEitan Adlerthe current time, 3813be6ef06SEitan Adlerthe number of existing processes, 3823be6ef06SEitan Adlerthe number of processes in each state 3833be6ef06SEitan Adler(sleeping, running, starting, zombies, and stopped), 3843be6ef06SEitan Adlerand a percentage of time spent in each of the processor states 3853be6ef06SEitan Adler(user, nice, system, and idle). 3863be6ef06SEitan AdlerIt also includes information about physical and virtual memory allocation. 3879d6cce02SEitan Adler.Pp 3883be6ef06SEitan AdlerThe remainder of the screen displays information about individual 3899d6cce02SEitan Adlerprocesses. 3909d6cce02SEitan AdlerThis display is similar in spirit to 3919d6cce02SEitan Adler.Xr ps 1 3929d6cce02SEitan Adlerbut it is not exactly the same. 3939d6cce02SEitan AdlerPID is the process id, 3943be6ef06SEitan AdlerJID, when displayed, is the 3959d6cce02SEitan Adler.Xr jail 8 3963be6ef06SEitan AdlerID corresponding to the process, 3973be6ef06SEitan AdlerUSERNAME is the name of the process's owner (if 3989d6cce02SEitan Adler.Fl u 3993be6ef06SEitan Adleris specified, a UID column will be substituted for USERNAME), 4003be6ef06SEitan AdlerPRI is the current priority of the process, 4019d6cce02SEitan AdlerNICE is the 4029d6cce02SEitan Adler.Xr nice 1 4039d6cce02SEitan Adleramount, 4043be6ef06SEitan AdlerSIZE is the total size of the process (text, data, and stack), 4053be6ef06SEitan AdlerRES is the current amount of resident memory, 4063be6ef06SEitan AdlerSWAP is the approximate amount of swap, if enabled 4073be6ef06SEitan Adler(SIZE, RES and SWAP are given in kilobytes), 408*01e31405SMateusz PiotrowskiSTATE is the current state (one of 409*01e31405SMateusz Piotrowski.Dq START , 410*01e31405SMateusz Piotrowski.Dq RUN 411*01e31405SMateusz Piotrowski(shown as 412*01e31405SMateusz Piotrowski.Dq CPUn 413*01e31405SMateusz Piotrowskion SMP systems), 414*01e31405SMateusz Piotrowski.Dq SLEEP , 415*01e31405SMateusz Piotrowski.Dq STOP , 416*01e31405SMateusz Piotrowski.Dq ZOMB , 417*01e31405SMateusz Piotrowski.Dq WAIT , 418*01e31405SMateusz Piotrowski.Dq LOCK , 419*01e31405SMateusz Piotrowskior the event on which the process waits), 4203be6ef06SEitan AdlerC is the processor number on which the process is executing 4213be6ef06SEitan Adler(visible only on SMP systems), 4223be6ef06SEitan AdlerTIME is the number of system and user cpu seconds that the process has used, 4233be6ef06SEitan AdlerWCPU, when displayed, is the weighted cpu percentage (this is the same 4243be6ef06SEitan Adlervalue that 4259d6cce02SEitan Adler.Xr ps 1 4263be6ef06SEitan Adlerdisplays as CPU), 4273be6ef06SEitan AdlerCPU is the raw percentage and is the field that is sorted to determine 4283be6ef06SEitan Adlerthe order of the processes, and 4293be6ef06SEitan AdlerCOMMAND is the name of the command that the process is currently running 430*01e31405SMateusz Piotrowski(if the process is swapped out, this column is marked 431*01e31405SMateusz Piotrowski.Dq <swapped> ) . 4329d6cce02SEitan Adler.Pp 433*01e31405SMateusz PiotrowskiIf a process is in the 434*01e31405SMateusz Piotrowski.Dq SLEEP 435*01e31405SMateusz Piotrowskior 436*01e31405SMateusz Piotrowski.Dq LOCK 437*01e31405SMateusz Piotrowskistate, 4383be6ef06SEitan Adlerthe state column will report the name of the event or lock on which the 4393be6ef06SEitan Adlerprocess is waiting. 440*01e31405SMateusz PiotrowskiLock names are prefixed with an asterisk 441*01e31405SMateusz Piotrowski.Dq * 442*01e31405SMateusz Piotrowskiwhile sleep events 4433be6ef06SEitan Adlerare not. 444fab44dc3SMateusz Piotrowski.Sh DESCRIPTION OF MEMORY 445fab44dc3SMateusz Piotrowski.Bd -literal 446fab44dc3SMateusz PiotrowskiMem: 61M Active, 86M Inact, 368K Laundry, 22G Wired, 102G Free 447fab44dc3SMateusz PiotrowskiARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other 448fab44dc3SMateusz Piotrowski 15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead 449fab44dc3SMateusz PiotrowskiSwap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out 450fab44dc3SMateusz Piotrowski.Ed 451fab44dc3SMateusz Piotrowski.Ss Physical Memory Stats 452fab44dc3SMateusz Piotrowski.Bl -tag -width "Uncompressed" -compact 453fab44dc3SMateusz Piotrowski.It Em Active 454fab44dc3SMateusz Piotrowskinumber of bytes active 455fab44dc3SMateusz Piotrowski.It Em Inact 456fab44dc3SMateusz Piotrowskinumber of clean bytes inactive 457fab44dc3SMateusz Piotrowski.It Em Laundry 458fab44dc3SMateusz Piotrowskinumber of dirty bytes queued for laundering 459fab44dc3SMateusz Piotrowski.It Em Wired 460fab44dc3SMateusz Piotrowskinumber of bytes wired down, including IO-level cached file data pages 461fab44dc3SMateusz Piotrowski.It Em Buf 462fab44dc3SMateusz Piotrowskinumber of bytes used for IO-level disk caching 463fab44dc3SMateusz Piotrowski.It Em Free 464fab44dc3SMateusz Piotrowskinumber of bytes free 465fab44dc3SMateusz Piotrowski.El 466fab44dc3SMateusz Piotrowski.Ss ZFS ARC Stats 467fab44dc3SMateusz PiotrowskiThese stats are only displayed when the ARC is in use. 4689d6cce02SEitan Adler.Pp 469fab44dc3SMateusz Piotrowski.Bl -tag -width "Uncompressed" -compact 470fab44dc3SMateusz Piotrowski.It Em Total 471fab44dc3SMateusz Piotrowskinumber of wired bytes used for the ZFS ARC 472fab44dc3SMateusz Piotrowski.It Em MRU 473fab44dc3SMateusz Piotrowskinumber of ARC bytes holding most recently used data 474fab44dc3SMateusz Piotrowski.It Em MFU 475fab44dc3SMateusz Piotrowskinumber of ARC bytes holding most frequently used data 476fab44dc3SMateusz Piotrowski.It Em Anon 477fab44dc3SMateusz Piotrowskinumber of ARC bytes holding in flight data 478fab44dc3SMateusz Piotrowski.It Em Header 479fab44dc3SMateusz Piotrowskinumber of ARC bytes holding headers 480fab44dc3SMateusz Piotrowski.It Em Other 481fab44dc3SMateusz Piotrowskimiscellaneous ARC bytes 482fab44dc3SMateusz Piotrowski.It Em Compressed 483fab44dc3SMateusz Piotrowskibytes of memory used by ARC caches 484fab44dc3SMateusz Piotrowski.It Em Uncompressed 485fab44dc3SMateusz Piotrowskibytes of data stored in ARC caches before compression 486fab44dc3SMateusz Piotrowski.It Em Ratio 487fab44dc3SMateusz Piotrowskicompression ratio of data cached in the ARC 488fab44dc3SMateusz Piotrowski.El 489fab44dc3SMateusz Piotrowski.Ss Swap Stats 490fab44dc3SMateusz Piotrowski.Bl -tag -width "Uncompressed" -compact 491fab44dc3SMateusz Piotrowski.It Em Total 492fab44dc3SMateusz Piotrowskitotal available swap usage 493fab44dc3SMateusz Piotrowski.It Em Free 494fab44dc3SMateusz Piotrowskitotal free swap usage 495fab44dc3SMateusz Piotrowski.It Em Inuse 496fab44dc3SMateusz Piotrowskiswap usage 497fab44dc3SMateusz Piotrowski.It Em \&In 498fab44dc3SMateusz Piotrowskibytes paged in from swap devices (last interval) 499fab44dc3SMateusz Piotrowski.It Em Out 500fab44dc3SMateusz Piotrowskibytes paged out to swap devices (last interval) 501fab44dc3SMateusz Piotrowski.El 5029d6cce02SEitan Adler.Sh ENVIRONMENT 503fab44dc3SMateusz Piotrowski.Bl -tag -width "Uncompressed" 504fab44dc3SMateusz Piotrowski.It Ev TOP 5059d6cce02SEitan AdlerDefault set of arguments to 5069d6cce02SEitan Adler.Nm . 507ecc2b89fSHiroki Sato.It Ev LC_CTYPE 508ecc2b89fSHiroki SatoThe locale to use when displaying the 509ecc2b89fSHiroki Sato.Va argv 510ecc2b89fSHiroki Satovector when 511ecc2b89fSHiroki Sato.Fl a 512ecc2b89fSHiroki Satoflag is specified. 5139d6cce02SEitan Adler.El 5149d6cce02SEitan Adler.Sh SEE ALSO 5159d6cce02SEitan Adler.Xr kill 1 , 5169d6cce02SEitan Adler.Xr ps 1 , 5179d6cce02SEitan Adler.Xr stty 1 , 5189d6cce02SEitan Adler.Xr getrusage 2 , 5199d6cce02SEitan Adler.Xr humanize_number 3 , 5209d6cce02SEitan Adler.Xr mem 4 , 5219d6cce02SEitan Adler.Xr renice 8 522fab44dc3SMateusz Piotrowski.Sh AUTHORS 523fab44dc3SMateusz Piotrowski.An William LeFebvre, EECS Department, Northwestern University 524fab44dc3SMateusz Piotrowski.Sh BUGS 525fab44dc3SMateusz PiotrowskiThe command name for swapped processes should be tracked down, but this 526fab44dc3SMateusz Piotrowskiwould make the program run slower. 527fab44dc3SMateusz Piotrowski.Pp 528fab44dc3SMateusz PiotrowskiAs with 529fab44dc3SMateusz Piotrowski.Xr ps 1 , 530fab44dc3SMateusz Piotrowskithings can change while 531fab44dc3SMateusz Piotrowski.Nm 532fab44dc3SMateusz Piotrowskiis collecting information for an update. 533fab44dc3SMateusz PiotrowskiThe picture it gives is only a close approximation to reality. 534