top.1 (c947fc5fae31c5935a57abcaa76f40fc8950ce59) | top.1 (01e3140571bab1a7283e33669de171865cdb8028) |
---|---|
1.\" $FreeBSD$ 2.Dd November 18, 2021 3.Dt TOP 1 4.Os 5.Sh NAME 6.Nm top 7.Nd display and update information about the top cpu processes 8.Sh SYNOPSIS --- 21 unchanged lines hidden (view full) --- 30is given, then the top 31.Ar number 32processes will be displayed instead of the default. 33.Pp 34.Nm 35makes a distinction between terminals that support advanced capabilities 36and those that do not. 37This distinction affects the choice of defaults for certain options. | 1.\" $FreeBSD$ 2.Dd November 18, 2021 3.Dt TOP 1 4.Os 5.Sh NAME 6.Nm top 7.Nd display and update information about the top cpu processes 8.Sh SYNOPSIS --- 21 unchanged lines hidden (view full) --- 30is given, then the top 31.Ar number 32processes will be displayed instead of the default. 33.Pp 34.Nm 35makes a distinction between terminals that support advanced capabilities 36and those that do not. 37This distinction affects the choice of defaults for certain options. |
38In the remainder of this document, an \*(lqintelligent\*(rq terminal is one that | 38In the remainder of this document, an 39.Dq intelligent 40terminal is one that |
39supports cursor addressing, clear screen, and clear to end of line. | 41supports cursor addressing, clear screen, and clear to end of line. |
40Conversely, a \*(lqdumb\*(rq terminal is one that does not support such | 42Conversely, a 43.Dq dumb 44terminal is one that does not support such |
41features. 42If the output of 43.Nm 44is redirected to a file, it acts as if it were being run on a dumb 45terminal. 46.Pp 47The options are as follows: 48.Bl -tag -width indent 49.It Fl a 50Display command names derived from the argv[] vector, rather than real 51executable name. 52It it useful when you want to watch applications, that 53puts their status information there. 54If the real name differs from argv[0], 55it will be displayed in parenthesis. 56Non-printable characters in the command line are 57encoded in C-style backslash sequences or 58a three digit octal sequences. 59.It Fl b | 45features. 46If the output of 47.Nm 48is redirected to a file, it acts as if it were being run on a dumb 49terminal. 50.Pp 51The options are as follows: 52.Bl -tag -width indent 53.It Fl a 54Display command names derived from the argv[] vector, rather than real 55executable name. 56It it useful when you want to watch applications, that 57puts their status information there. 58If the real name differs from argv[0], 59it will be displayed in parenthesis. 60Non-printable characters in the command line are 61encoded in C-style backslash sequences or 62a three digit octal sequences. 63.It Fl b |
60Use \*(lqbatch\*(rq mode. | 64Use 65.Dq batch 66mode. |
61In this mode, all input from the terminal is 62ignored. 63Interrupt characters (such as ^C and ^\e) still have an effect. 64This is the default on a dumb terminal, or when the output is not a terminal. 65.It Fl C 66Toggle CPU display mode. 67By default top displays the weighted CPU percentage in the WCPU column 68(this is the same value that 69.Xr ps 1 70displays as CPU). 71Each time 72.Fl C | 67In this mode, all input from the terminal is 68ignored. 69Interrupt characters (such as ^C and ^\e) still have an effect. 70This is the default on a dumb terminal, or when the output is not a terminal. 71.It Fl C 72Toggle CPU display mode. 73By default top displays the weighted CPU percentage in the WCPU column 74(this is the same value that 75.Xr ps 1 76displays as CPU). 77Each time 78.Fl C |
73flag is passed it toggles between \*(lqraw cpu\*(rq mode 74and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or 75the \*(lqWCPU\*(rq column respectively. | 79flag is passed it toggles between 80.Dq raw cpu 81mode and 82.Dq weighted cpu 83mode, showing the 84.Dq CPU 85or the 86.Dq WCPU 87column respectively. |
76.It Fl d Ar count 77Show only 78.Ar count 79displays, then exit. 80A display is considered to be one update of the 81screen. 82The default is 1 for dumb terminals. 83Note that for 84.Ar count 85= 1 86no information is available about the percentage of time spent by the CPU in every state. 87.It Fl H 88Display each thread for a multithreaded process individually. 89By default a single summary line is displayed for each process. 90.It Fl I 91Do not display idle processes. 92By default, top displays both active and idle processes. 93.It Fl i | 88.It Fl d Ar count 89Show only 90.Ar count 91displays, then exit. 92A display is considered to be one update of the 93screen. 94The default is 1 for dumb terminals. 95Note that for 96.Ar count 97= 1 98no information is available about the percentage of time spent by the CPU in every state. 99.It Fl H 100Display each thread for a multithreaded process individually. 101By default a single summary line is displayed for each process. 102.It Fl I 103Do not display idle processes. 104By default, top displays both active and idle processes. 105.It Fl i |
94Use \*(lqinteractive\*(rq mode. | 106Use 107.Dq interactive 108mode. |
95In this mode, any input is immediately 96read for processing. | 109In this mode, any input is immediately 110read for processing. |
97See the section on \*(lqInteractive Mode\*(rq | 111See the section on 112.Dq Interactive Mode |
98for an explanation of 99which keys perform what functions. 100After the command is processed, the 101screen will immediately be updated, even if the command was not 102understood. 103This mode is the default when standard output is an 104intelligent terminal. 105.It Fl J Ar jail --- 18 unchanged lines hidden (view full) --- 124.Ar mode . 125Available modes are 126.Cm cpu 127and 128.Cm io . 129Default is 130.Cm cpu . 131.It Fl n | 113for an explanation of 114which keys perform what functions. 115After the command is processed, the 116screen will immediately be updated, even if the command was not 117understood. 118This mode is the default when standard output is an 119intelligent terminal. 120.It Fl J Ar jail --- 18 unchanged lines hidden (view full) --- 139.Ar mode . 140Available modes are 141.Cm cpu 142and 143.Cm io . 144Default is 145.Cm cpu . 146.It Fl n |
132Use \*(lqnon-interactive\*(rq mode. 133This is identical to \*(lqbatch\*(rq | 147Use 148.Dq non-interactive |
134mode. | 149mode. |
150This is identical to 151.Dq batch 152mode. |
|
135.It Fl o Ar field 136Sort the process display area on the specified field. 137The field name 138is the name of the column as seen in the output, but in lower case: | 153.It Fl o Ar field 154Sort the process display area on the specified field. 155The field name 156is the name of the column as seen in the output, but in lower case: |
139\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, 140\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, 141\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, 142\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. | 157.Dq cpu , 158.Dq size , 159.Dq res , 160.Dq time , 161.Dq pri , 162.Dq threads , 163.Dq total , 164.Dq read , 165.Dq write , 166.Dq fault , 167.Dq vcsw , 168.Dq ivcsw , 169.Dq jid , 170.Dq swap , 171or 172.Dq pid . |
143.It Fl P 144Display per-cpu CPU usage statistics. 145.It Fl p Ar pid 146Show only the process 147.Ar pid . 148.It Fl q 149Renice 150.Nm --- 20 unchanged lines hidden (view full) --- 171Show only those processes owned by 172.Ar username . 173This option currently only accepts usernames and will not understand 174uid numbers. 175.It Fl u 176Do not map uid numbers to usernames. 177Normally, 178.Nm | 173.It Fl P 174Display per-cpu CPU usage statistics. 175.It Fl p Ar pid 176Show only the process 177.Ar pid . 178.It Fl q 179Renice 180.Nm --- 20 unchanged lines hidden (view full) --- 201Show only those processes owned by 202.Ar username . 203This option currently only accepts usernames and will not understand 204uid numbers. 205.It Fl u 206Do not map uid numbers to usernames. 207Normally, 208.Nm |
179will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map | 209will read as much of the file 210.Pa /etc/passwd 211as is necessary to map |
180all the user id numbers it encounters into login names. 181This option disables all that, while possibly decreasing execution time. 182The uid numbers are displayed instead of the names. 183.It Fl v 184Write version number information to stderr then exit immediately. 185.It Fl w 186Display approximate swap usage for each process. 187.It Fl z 188Do not display the system idle process. 189.El 190.Pp 191Both 192.Ar count 193and 194.Ar number | 212all the user id numbers it encounters into login names. 213This option disables all that, while possibly decreasing execution time. 214The uid numbers are displayed instead of the names. 215.It Fl v 216Write version number information to stderr then exit immediately. 217.It Fl w 218Display approximate swap usage for each process. 219.It Fl z 220Do not display the system idle process. 221.El 222.Pp 223Both 224.Ar count 225and 226.Ar number |
195fields can be specified as \*(lqinfinite\*(rq, indicating that they can | 227fields can be specified as 228.Dq infinite , 229indicating that they can |
196stretch as far as possible. 197This is accomplished by using any proper 198prefix of the keywords | 230stretch as far as possible. 231This is accomplished by using any proper 232prefix of the keywords |
199\*(lqinfinity\*(rq, 200\*(lqmaximum\*(rq, | 233.Dq infinity , 234.Dq maximum , |
201or | 235or |
202\*(lqall\*(rq. | 236.Dq all . |
203Boolean flags are toggles. 204A second specification of any of these options will negate the first. 205.Sh "INTERACTIVE MODE" 206When 207.Nm | 237Boolean flags are toggles. 238A second specification of any of these options will negate the first. 239.Sh "INTERACTIVE MODE" 240When 241.Nm |
208is running in \*(lqinteractive mode\*(rq, it reads commands from the | 242is running in 243.Dq interactive mode , 244it reads commands from the |
209terminal and acts upon them accordingly. 210In this mode, the terminal is | 245terminal and acts upon them accordingly. 246In this mode, the terminal is |
211put in \*(lqCBREAK\*(rq, so that a character will be | 247put in 248.Dq CBREAK , 249so that a character will be |
212processed as soon as it is typed. 213Almost always, a key will be 214pressed when 215.Nm 216is between displays; that is, while it is waiting for 217.Ar time 218seconds to elapse. 219If this is the case, the command will be --- 40 unchanged lines hidden (view full) --- 260.It s 261Change the number of seconds to delay between displays 262(prompt for new number). 263.It S 264Toggle the display of system processes. 265.It a 266Toggle the display of process titles. 267.It k | 250processed as soon as it is typed. 251Almost always, a key will be 252pressed when 253.Nm 254is between displays; that is, while it is waiting for 255.Ar time 256seconds to elapse. 257If this is the case, the command will be --- 40 unchanged lines hidden (view full) --- 298.It s 299Change the number of seconds to delay between displays 300(prompt for new number). 301.It S 302Toggle the display of system processes. 303.It a 304Toggle the display of process titles. 305.It k |
268Send a signal (\*(lqkill\*(rq by default) to a list of processes. | 306Send a signal 307.Pq SIGKILL by default 308to a list of processes. |
269This acts similarly to the command 270.Xr kill 1 . 271.It r | 309This acts similarly to the command 310.Xr kill 1 . 311.It r |
272Change the priority (the \*(lqnice\*(rq) of a list of processes. | 312Change the priority 313.Pq the Dq nice 314of a list of processes. |
273This acts similarly to 274.Xr renice 8 . 275.It u 276Display only processes owned by a specific set of usernames (prompt for 277username). | 315This acts similarly to 316.Xr renice 8 . 317.It u 318Display only processes owned by a specific set of usernames (prompt for 319username). |
278If the username specified is simply \*(lq+\*(rq or \*(lq-\*(rq, | 320If the username specified is simply 321.Dq + 322or 323.Dq - , |
279then processes belonging to all users will be displayed. 280Usernames can be added | 324then processes belonging to all users will be displayed. 325Usernames can be added |
281to and removed from the set by prepending them with \*(lq+\*(rq and 282\*(lq-\*(rq, respectively. | 326to and removed from the set by prepending them with 327.Dq + 328and 329.Dq - , 330respectively. |
283.It o 284Change the order in which the display is sorted. 285The sort key names include | 331.It o 332Change the order in which the display is sorted. 333The sort key names include |
286\*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, 287\*(lqtime\*(rq. | 334.Dq cpu , 335.Dq res , 336.Dq size , 337and 338.Dq time. |
288The default is cpu. 289.It p 290Display a specific process (prompt for pid). | 339The default is cpu. 340.It p 341Display a specific process (prompt for pid). |
291If the pid specified is simply \*(lq+\*(rq, then show all processes. | 342If the pid specified is simply 343.Dq + , 344then show all processes. |
292.It e 293Display a list of system errors (if any) generated by the last 294command. 295.It H 296Toggle the display of threads. 297.It i or I 298Toggle the display of idle processes. 299.It j 300Toggle the display of 301.Xr jail 8 302ID. 303.It J 304Display only processes owned by a specific jail (prompt for jail). | 345.It e 346Display a list of system errors (if any) generated by the last 347command. 348.It H 349Toggle the display of threads. 350.It i or I 351Toggle the display of idle processes. 352.It j 353Toggle the display of 354.Xr jail 8 355ID. 356.It J 357Display only processes owned by a specific jail (prompt for jail). |
305If the jail specified is simply \*(lq+\*(rq, then processes belonging | 358If the jail specified is simply 359.Dq + , 360then processes belonging |
306to all jails and the host will be displayed. 307This will also enable the display of JID. 308.It P 309Toggle the display of per-CPU statistics. 310.It T 311Toggle display of TID and PID 312.It t 313Toggle the display of the --- 32 unchanged lines hidden (view full) --- 346PRI is the current priority of the process, 347NICE is the 348.Xr nice 1 349amount, 350SIZE is the total size of the process (text, data, and stack), 351RES is the current amount of resident memory, 352SWAP is the approximate amount of swap, if enabled 353(SIZE, RES and SWAP are given in kilobytes), | 361to all jails and the host will be displayed. 362This will also enable the display of JID. 363.It P 364Toggle the display of per-CPU statistics. 365.It T 366Toggle display of TID and PID 367.It t 368Toggle the display of the --- 32 unchanged lines hidden (view full) --- 401PRI is the current priority of the process, 402NICE is the 403.Xr nice 1 404amount, 405SIZE is the total size of the process (text, data, and stack), 406RES is the current amount of resident memory, 407SWAP is the approximate amount of swap, if enabled 408(SIZE, RES and SWAP are given in kilobytes), |
354STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq 355(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, 356\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the 357process waits), | 409STATE is the current state (one of 410.Dq START , 411.Dq RUN 412(shown as 413.Dq CPUn 414on SMP systems), 415.Dq SLEEP , 416.Dq STOP , 417.Dq ZOMB , 418.Dq WAIT , 419.Dq LOCK , 420or the event on which the process waits), |
358C is the processor number on which the process is executing 359(visible only on SMP systems), 360TIME is the number of system and user cpu seconds that the process has used, 361WCPU, when displayed, is the weighted cpu percentage (this is the same 362value that 363.Xr ps 1 364displays as CPU), 365CPU is the raw percentage and is the field that is sorted to determine 366the order of the processes, and 367COMMAND is the name of the command that the process is currently running | 421C is the processor number on which the process is executing 422(visible only on SMP systems), 423TIME is the number of system and user cpu seconds that the process has used, 424WCPU, when displayed, is the weighted cpu percentage (this is the same 425value that 426.Xr ps 1 427displays as CPU), 428CPU is the raw percentage and is the field that is sorted to determine 429the order of the processes, and 430COMMAND is the name of the command that the process is currently running |
368(if the process is swapped out, this column is marked \*(lq<swapped>\*(rq). | 431(if the process is swapped out, this column is marked 432.Dq <swapped> ) . |
369.Pp | 433.Pp |
370If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, | 434If a process is in the 435.Dq SLEEP 436or 437.Dq LOCK 438state, |
371the state column will report the name of the event or lock on which the 372process is waiting. | 439the state column will report the name of the event or lock on which the 440process is waiting. |
373Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events | 441Lock names are prefixed with an asterisk 442.Dq * 443while sleep events |
374are not. 375.Sh DESCRIPTION OF MEMORY 376.Bd -literal 377Mem: 61M Active, 86M Inact, 368K Laundry, 22G Wired, 102G Free 378ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other 379 15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead 380Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out 381.Ed --- 83 unchanged lines hidden --- | 444are not. 445.Sh DESCRIPTION OF MEMORY 446.Bd -literal 447Mem: 61M Active, 86M Inact, 368K Laundry, 22G Wired, 102G Free 448ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other 449 15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead 450Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out 451.Ed --- 83 unchanged lines hidden --- |