1*7a491db4SAaron LI.\" Copyright (c) 1984 through 2008, William LeFebvre 2*7a491db4SAaron LI.\" All rights reserved. 3*7a491db4SAaron LI.\" 4*7a491db4SAaron LI.\" Redistribution and use in source and binary forms, with or without 5*7a491db4SAaron LI.\" modification, are permitted provided that the following conditions 6*7a491db4SAaron LI.\" are met: 7*7a491db4SAaron LI.\" 8*7a491db4SAaron LI.\" * Redistributions of source code must retain the above copyright 9*7a491db4SAaron LI.\" notice, this list of conditions and the following disclaimer. 10*7a491db4SAaron LI.\" 11*7a491db4SAaron LI.\" * Redistributions in binary form must reproduce the above 12*7a491db4SAaron LI.\" copyright notice, this list of conditions and the following disclaimer 13*7a491db4SAaron LI.\" in the documentation and/or other materials provided with the 14*7a491db4SAaron LI.\" distribution. 15*7a491db4SAaron LI.\" 16*7a491db4SAaron LI.\" * Neither the name of William LeFebvre nor the names of other 17*7a491db4SAaron LI.\" contributors may be used to endorse or promote products derived from 18*7a491db4SAaron LI.\" this software without specific prior written permission. 19*7a491db4SAaron LI.\" 20*7a491db4SAaron LI.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21*7a491db4SAaron LI.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*7a491db4SAaron LI.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23*7a491db4SAaron LI.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24*7a491db4SAaron LI.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25*7a491db4SAaron LI.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26*7a491db4SAaron LI.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27*7a491db4SAaron LI.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28*7a491db4SAaron LI.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29*7a491db4SAaron LI.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30*7a491db4SAaron LI.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31*7a491db4SAaron LI.\" 32*7a491db4SAaron LI.Dd February 15, 2023 335639b7e3SSascha Wildner.Dt TOP 1 345639b7e3SSascha Wildner.Os 355639b7e3SSascha Wildner.Sh NAME 365639b7e3SSascha Wildner.Nm top 375639b7e3SSascha Wildner.Nd display and update information about the top cpu processes 385639b7e3SSascha Wildner.Sh SYNOPSIS 39784b0251SSascha Wildner.Nm 405639b7e3SSascha Wildner.Op Fl CIMSTabcinqtuv 415639b7e3SSascha Wildner.Op Fl d Ar count 425639b7e3SSascha Wildner.Op Fl m Ar mode 435639b7e3SSascha Wildner.Op Fl o Ar field 445639b7e3SSascha Wildner.Op Fl s Ar time 455639b7e3SSascha Wildner.Op Fl U Ar username 465639b7e3SSascha Wildner.Op Ar number 475639b7e3SSascha Wildner.Sh DESCRIPTION 485639b7e3SSascha Wildner.Nm 49c6da48e4SSascha Wildnerdisplays the top 50c6da48e4SSascha Wildnerprocesses on the system and periodically updates this information. 515639b7e3SSascha WildnerRaw cpu percentage is used to rank the processes. 525639b7e3SSascha Wildner.Pp 535639b7e3SSascha Wildner.Nm 54c6da48e4SSascha Wildnermakes a distinction between terminals that support advanced capabilities 555639b7e3SSascha Wildnerand those that do not. 565639b7e3SSascha WildnerThis distinction affects the choice of defaults for certain options. 575639b7e3SSascha WildnerIn the remainder of this document, an 585639b7e3SSascha Wildner.Dq intelligent 595639b7e3SSascha Wildnerterminal is one that 60c6da48e4SSascha Wildnersupports cursor addressing, clear screen, and clear to end of line. 615639b7e3SSascha WildnerConversely, a 625639b7e3SSascha Wildner.Dq dumb 635639b7e3SSascha Wildnerterminal is one that does not support such features. 645639b7e3SSascha WildnerIf the output of 655639b7e3SSascha Wildner.Nm 66b827281dSSascha Wildneris redirected to a file, it acts as if it were being run on a dumb 67c6da48e4SSascha Wildnerterminal. 685639b7e3SSascha Wildner.Ss OPTIONS 695639b7e3SSascha Wildner.Bl -tag -width "-U username" -offset indent 705639b7e3SSascha Wildner.It Fl C 71c6da48e4SSascha WildnerTurn off the use of color in the display. 725639b7e3SSascha Wildner.It Fl I 73c6da48e4SSascha WildnerDo not display idle processes. 74c6da48e4SSascha WildnerBy default, top displays both active and idle processes. 755639b7e3SSascha Wildner.It Fl M 76c6da48e4SSascha WildnerEnable multi-CPU display. 775639b7e3SSascha Wildner.It Fl S 785639b7e3SSascha WildnerShow system processes in the display. 795639b7e3SSascha WildnerNormally, system processes such as the pager and the swapper are not shown. 805639b7e3SSascha WildnerThis option makes them visible. 815639b7e3SSascha Wildner.It Fl T 82c6da48e4SSascha WildnerList all available color tags and the current set of tests used for 83c6da48e4SSascha Wildnercolor highlighting, then exit. 845639b7e3SSascha Wildner.It Fl a 855639b7e3SSascha WildnerShow all processes for as long as possible. 865639b7e3SSascha WildnerThis is shorthand for 875639b7e3SSascha Wildner.Dq Fl d Li all Li all . 885639b7e3SSascha WildnerThis option is especially handy in batch mode. 895639b7e3SSascha Wildner.It Fl b 905639b7e3SSascha WildnerUse 915639b7e3SSascha Wildner.Dq batch 925639b7e3SSascha Wildnermode. 935639b7e3SSascha WildnerIn this mode, all input from the terminal is ignored. 945639b7e3SSascha WildnerInterrupt characters (such as ^C and ^\e) still have an effect. 95c6da48e4SSascha WildnerThis is the default on a dumb terminal, or when the output is not a terminal. 965639b7e3SSascha Wildner.It Fl c 975639b7e3SSascha WildnerShow the full command line for each process. 985639b7e3SSascha WildnerDefault is to show just the command name. 995639b7e3SSascha WildnerThis option is not supported on all platforms. 1005639b7e3SSascha Wildner.It Fl i 1015639b7e3SSascha WildnerUse 1025639b7e3SSascha Wildner.Dq interactive 1035639b7e3SSascha Wildnermode. 1045639b7e3SSascha WildnerIn this mode, any input is immediately read for processing. 1055639b7e3SSascha WildnerSee the subsection on 1065639b7e3SSascha Wildner.Sx INTERACTIVE MODE 1075639b7e3SSascha Wildnerfor an explanation of which keys perform what functions. 1085639b7e3SSascha WildnerAfter the command is processed, the screen will immediately be updated, 1095639b7e3SSascha Wildnereven if the command was not understood. 1105639b7e3SSascha WildnerThis mode is the default when standard output is an intelligent terminal. 1115639b7e3SSascha Wildner.It Fl q 112c6da48e4SSascha WildnerRenice 1135639b7e3SSascha Wildner.Nm 1145639b7e3SSascha Wildnerto \-20 so that it will run faster. 1155639b7e3SSascha WildnerThis can be used when the system is being very sluggish to improve the 1165639b7e3SSascha Wildnerpossibility of discovering the problem. 117c6da48e4SSascha WildnerThis option can only be used by root. 1185639b7e3SSascha Wildner.It Fl t 1195639b7e3SSascha WildnerShow individual threads on separate lines. 1205639b7e3SSascha WildnerBy default, on systems which support threading, each process is shown 1215639b7e3SSascha Wildnerwith a count of the number of threads. 1225639b7e3SSascha WildnerThis option shows each thread on a separate line. 1235639b7e3SSascha WildnerThis option is not supported on all platforms. 1245639b7e3SSascha Wildner.It Fl u 1255639b7e3SSascha WildnerDo not take the time to map uid numbers to usernames. 1265639b7e3SSascha WildnerNormally, 1275639b7e3SSascha Wildner.Nm 1285639b7e3SSascha Wildnerwill read as much of the file 1295639b7e3SSascha Wildner.Pa /etc/passwd 1305639b7e3SSascha Wildneras is necessary to map all the user id numbers it encounters into login names. 1315639b7e3SSascha WildnerThis option disables all that, while possibly decreasing execution time. 1325639b7e3SSascha WildnerThe uid numbers are displayed instead of the names. 1335639b7e3SSascha Wildner.It Fl v 134c6da48e4SSascha WildnerWrite version number information to stderr then exit immediately. 1355639b7e3SSascha WildnerNo other processing takes place when this option is used. 1365639b7e3SSascha WildnerTo see current revision information while top is running, 1375639b7e3SSascha Wildneruse the help command 1385639b7e3SSascha Wildner.Dq \&? . 1395639b7e3SSascha Wildner.It Fl d Ar count 140c6da48e4SSascha WildnerShow only 1415639b7e3SSascha Wildner.Ar count 1425639b7e3SSascha Wildnerdisplays, then exit. 1435639b7e3SSascha WildnerA display is considered to be one update of the screen. 1445639b7e3SSascha WildnerThis option allows the user to select the number of displays he 145c6da48e4SSascha Wildnerwants to see before 1465639b7e3SSascha Wildner.Nm 1475639b7e3SSascha Wildnerautomatically exits. 1485639b7e3SSascha WildnerAny proper prefix of the words 1495639b7e3SSascha Wildner.Sq Li infinity , 1505639b7e3SSascha Wildner.Sq Li maximum , 151c6da48e4SSascha Wildneror 1525639b7e3SSascha Wildner.Sq Li all 1535639b7e3SSascha Wildnercan be used to indicate an infinite number of displays. 1545639b7e3SSascha WildnerThe default for intelligent terminals is 1555639b7e3SSascha Wildner.Sq Li infinity . 1565639b7e3SSascha WildnerThe default for dumb terminals is 1575639b7e3SSascha Wildner.Sq Li 1 . 1585639b7e3SSascha Wildner.It Fl m Ar mode 1595639b7e3SSascha WildnerStart the display in an alternate mode. 1605639b7e3SSascha WildnerSome platforms support multiple 1615639b7e3SSascha Wildnerprocess displays to show additional process information. 1625639b7e3SSascha WildnerThe value of 1635639b7e3SSascha Wildner.Ar mode 1645639b7e3SSascha Wildneris a number indicating which mode to display. 1655639b7e3SSascha WildnerThe default is 1665639b7e3SSascha Wildner.Sq Li 0 . 1675639b7e3SSascha WildnerOn platforms that do not have multiple display modes this option has 168c6da48e4SSascha Wildnerno effect. 1695639b7e3SSascha Wildner.It Fl o Ar field 1705639b7e3SSascha WildnerSort the process display area on the specified field. 1715639b7e3SSascha WildnerThe field name is the name of the column as seen in the output, 1725639b7e3SSascha Wildnerbut in lower case. 1735639b7e3SSascha WildnerLikely values are 1745639b7e3SSascha Wildner.Sq Li cpu , 1755639b7e3SSascha Wildner.Sq Li size , 1765639b7e3SSascha Wildner.Sq Li res , 1775639b7e3SSascha Wildnerand 1785639b7e3SSascha Wildner.Sq Li time , 1795639b7e3SSascha Wildnerbut may vary on different operating systems. 1805639b7e3SSascha WildnerNote that not all operating systems support this option. 1815639b7e3SSascha Wildner.It Fl s Ar time 182c6da48e4SSascha WildnerSet the delay between screen updates to 1835639b7e3SSascha Wildner.Ar time 1845639b7e3SSascha Wildnerseconds. 1855639b7e3SSascha WildnerThe default delay between updates is 5 seconds. 1865639b7e3SSascha Wildner.It Fl U Ar username 187c6da48e4SSascha WildnerShow only those processes owned by 1885639b7e3SSascha Wildner.Ar username . 189c6da48e4SSascha WildnerThis option currently only accepts usernames and will not understand 190c6da48e4SSascha Wildneruid numbers. 1915639b7e3SSascha Wildner.El 1925639b7e3SSascha Wildner.Pp 1935639b7e3SSascha WildnerIf 1945639b7e3SSascha Wildner.Ar number 1955639b7e3SSascha Wildneris given, then the top 1965639b7e3SSascha Wildner.Ar number 1975639b7e3SSascha Wildnerprocesses will be displayed instead of the default. 198c6da48e4SSascha WildnerBoth 1995639b7e3SSascha Wildner.Ar count 200c6da48e4SSascha Wildnerand 2015639b7e3SSascha Wildner.Ar number 2025639b7e3SSascha Wildnerfields can be specified as 2035639b7e3SSascha Wildner.Sq Li infinite , 2045639b7e3SSascha Wildnerindicating that they can stretch as far as possible. 2055639b7e3SSascha WildnerThis is accomplished by using any proper prefix of the keywords 2065639b7e3SSascha Wildner.Sq Li infinity , 2075639b7e3SSascha Wildner.Sq Li maximum , 208c6da48e4SSascha Wildneror 2095639b7e3SSascha Wildner.Sq Li all . 210c6da48e4SSascha WildnerThe default for 2115639b7e3SSascha Wildner.Ar count 212c6da48e4SSascha Wildneron an intelligent terminal is, in fact, 2135639b7e3SSascha Wildner.Sq Li infinity . 2145639b7e3SSascha Wildner.Ss INTERACTIVE MODE 215c6da48e4SSascha WildnerWhen 2165639b7e3SSascha Wildner.Nm 2175639b7e3SSascha Wildneris running in 2185639b7e3SSascha Wildner.Dq interactive mode , 2195639b7e3SSascha Wildnerit reads commands from the terminal and acts upon them accordingly. 2205639b7e3SSascha WildnerIn this mode, the terminal is put in 2215639b7e3SSascha Wildner.Dq CBREAK , 2225639b7e3SSascha Wildnerso that a character will be processed as soon as it is typed. 2235639b7e3SSascha WildnerAlmost always, a key will be pressed when 2245639b7e3SSascha Wildner.Nm 225c6da48e4SSascha Wildneris between displays; that is, while it is waiting for 2265639b7e3SSascha Wildner.Ar time 2275639b7e3SSascha Wildnerseconds to elapse. 2285639b7e3SSascha WildnerIf this is the case, the command will be 229c6da48e4SSascha Wildnerprocessed and the display will be updated immediately thereafter 2305639b7e3SSascha Wildner(reflecting any changes that the command may have specified). 2315639b7e3SSascha WildnerThis happens even if the command was incorrect. 2325639b7e3SSascha WildnerIf a key is pressed while 2335639b7e3SSascha Wildner.Nm 234c6da48e4SSascha Wildneris in the middle of updating the display, it will finish the update and 2355639b7e3SSascha Wildnerthen process the command. 2365639b7e3SSascha WildnerSome commands require additional information, 2375639b7e3SSascha Wildnerand the user will be prompted accordingly. 2385639b7e3SSascha WildnerWhile typing this information 239c6da48e4SSascha Wildnerin, the user's erase and kill keys (as set up by the command 2405639b7e3SSascha Wildner.Xr stty 1 ) 2415639b7e3SSascha Wildnerare recognized, and a newline terminates the input. 2425639b7e3SSascha WildnerNote that a control\-L 243c6da48e4SSascha Wildner(^L) always redraws the current screen and a space forces an immediate 244c6da48e4SSascha Wildnerupdate to the screen using new data. 2455639b7e3SSascha Wildner.Pp 246c6da48e4SSascha WildnerThese commands are currently recognized: 2475639b7e3SSascha Wildner.Bl -tag -width "h or \&?" -offset indent 2485639b7e3SSascha Wildner.It h or \&? 2495639b7e3SSascha WildnerDisplay a summary of the commands (help screen). 2505639b7e3SSascha WildnerVersion information is included in this display. 2515639b7e3SSascha Wildner.It C 252c6da48e4SSascha WildnerToggle the use of color in the display. 2535639b7e3SSascha Wildner.It c 2545639b7e3SSascha WildnerDisplay only processes whose commands match the specified string. 2555639b7e3SSascha WildnerAn empty string will display all processes. 2565639b7e3SSascha WildnerThis command is not supported on all platforms. 2575639b7e3SSascha Wildner.It d 258c6da48e4SSascha WildnerChange the number of displays to show (prompt for new number). 259c6da48e4SSascha WildnerRemember that the next display counts as one, so typing 2605639b7e3SSascha Wildner.Dq d1 261c6da48e4SSascha Wildnerwill make 2625639b7e3SSascha Wildner.Nm 263c6da48e4SSascha Wildnershow one final display and then immediately exit. 2645639b7e3SSascha Wildner.It f 265c6da48e4SSascha WildnerToggle the display of the full command line. 2665639b7e3SSascha Wildner.It H 2675639b7e3SSascha WildnerToggle the display of threads on separate lines. 2685639b7e3SSascha WildnerBy default, on systems which support threading, 2695639b7e3SSascha Wildnereach process is shown with a count of the number of threads. 2705639b7e3SSascha WildnerThis command shows each thread on a separate line. 2715639b7e3SSascha WildnerThis command is not supported on all platforms. 2725639b7e3SSascha Wildner.It i or I 273c6da48e4SSascha WildnerToggle the display of idle processes. 2745639b7e3SSascha Wildner.It k 2755639b7e3SSascha WildnerSend a signal ( 2765639b7e3SSascha Wildner.Dq kill 2775639b7e3SSascha Wildnerby default) to a list of processes. 278c6da48e4SSascha WildnerThis acts similarly to the command 2795639b7e3SSascha Wildner.Xr kill 1 . 2805639b7e3SSascha Wildner.It M 2815639b7e3SSascha WildnerSort display by memory usage. 2825639b7e3SSascha WildnerShorthand for 2835639b7e3SSascha Wildner.Dq Fl o Li size . 2845639b7e3SSascha Wildner.It m 2855639b7e3SSascha WildnerChange to a different process display mode. 2865639b7e3SSascha WildnerSome systems provide multiple 2875639b7e3SSascha Wildnerdisplay modes for the process display which shows different information. 2885639b7e3SSascha WildnerThis command toggles between the available modes. 2895639b7e3SSascha WildnerThis command is not supported on all platforms. 2905639b7e3SSascha Wildner.It N 2915639b7e3SSascha WildnerSort by process id. 2925639b7e3SSascha WildnerShorthand for 2935639b7e3SSascha Wildner.Dq Fl o Li pid . 2945639b7e3SSascha Wildner.It n or # 2955639b7e3SSascha WildnerChange the number of processes to display (prompt for new number). 2965639b7e3SSascha Wildner.It o 2975639b7e3SSascha WildnerChange the order in which the display is sorted. 2985639b7e3SSascha WildnerThis command is not available on all systems. 2995639b7e3SSascha WildnerThe sort key names vary fron system to system, 3005639b7e3SSascha Wildnerbut usually include: 3015639b7e3SSascha Wildner.Sq Li cpu , 3025639b7e3SSascha Wildner.Sq Li res , 3035639b7e3SSascha Wildner.Sq Li size , 3045639b7e3SSascha Wildnerand 3055639b7e3SSascha Wildner.Sq Li time . 3065639b7e3SSascha WildnerThe default is 3075639b7e3SSascha Wildner.Sq Li cpu . 3085639b7e3SSascha Wildner.It P 3095639b7e3SSascha WildnerSort by CPU usage. 3105639b7e3SSascha WildnerShorthand for 3115639b7e3SSascha Wildner.Dq Fl o Li cpu . 3125639b7e3SSascha Wildner.It q 3135639b7e3SSascha WildnerQuit 3145639b7e3SSascha Wildner.Nm . 3155639b7e3SSascha Wildner.It r 3165639b7e3SSascha WildnerChange the priority (the niceness) of a list of processes. 3175639b7e3SSascha WildnerThis acts similarly to the command 3185639b7e3SSascha Wildner.Xr renice 8 . 3195639b7e3SSascha Wildner.It s 320c6da48e4SSascha WildnerChange the number of seconds to delay between displays 321c6da48e4SSascha Wildner(prompt for new number). 3225639b7e3SSascha Wildner.It T 3235639b7e3SSascha WildnerSort by CPU time. 3245639b7e3SSascha WildnerShorthand for 3255639b7e3SSascha Wildner.Dq Fl o Li time . 3265639b7e3SSascha Wildner.It U 327c6da48e4SSascha WildnerToggle between displaying usernames and uids. 3285639b7e3SSascha Wildner.It u 329c6da48e4SSascha WildnerDisplay only processes owned by a specific username (prompt for username). 3305639b7e3SSascha WildnerIf the username specified is simply 3315639b7e3SSascha Wildner.Dq + , 3325639b7e3SSascha Wildnerthen processes belonging to all users will be displayed. 3335639b7e3SSascha Wildner.El 3345639b7e3SSascha Wildner.Ss THE DISPLAY 335c6da48e4SSascha WildnerThe actual display varies depending on the specific variant of Unix 3365639b7e3SSascha Wildnerthat the machine is running. 3375639b7e3SSascha WildnerThis description may not exactly match what is seen by top running on 3385639b7e3SSascha Wildnerthis particular machine. 3395639b7e3SSascha WildnerDifferences are listed at the end of this manual entry. 3405639b7e3SSascha Wildner.Pp 341c6da48e4SSascha WildnerThe top lines of the display show general information 3425639b7e3SSascha Wildnerabout the state of the system. 3435639b7e3SSascha WildnerThe first line shows 344c6da48e4SSascha Wildner(on some systems) the last process id assigned to a process, 345c6da48e4SSascha Wildnerthe three load averages, 346c6da48e4SSascha Wildnerthe system uptime, and the current time. 347c6da48e4SSascha WildnerThe second line displays the total number of processes followed 3485639b7e3SSascha Wildnerby a breakdown of processes per state. 349*7a491db4SAaron LIExamples of states common to Unix systems are sleeping, running, starting, 350*7a491db4SAaron LIstopped, zombie, and dumping (i.e., generating a core). 351c6da48e4SSascha WildnerThe next line displays a percentage of time spent in each of the 352edc735acSJavier Alcázarprocessor states (user, nice, system, interrupt, idle). 353c6da48e4SSascha WildnerThese percentages show the processor activity during the time since 3545639b7e3SSascha Wildnerthe last update. 3555639b7e3SSascha WildnerFor multi-processor systems, this information is an average of all processors. 3565639b7e3SSascha WildnerThe next line shows kernel-related activity (not available on all systems). 3575639b7e3SSascha WildnerThe numbers shown on this line are per-second rates sampled since the last 3585639b7e3SSascha Wildnerupdate. 3595639b7e3SSascha WildnerThe exact information displayed varies between systems, but some examples are: 360c6da48e4SSascha Wildnercontext switches, interrupts, traps, forks, and page faults. 3615639b7e3SSascha Wildner.Pp 3625639b7e3SSascha WildnerThe last two lines show a summary of memory and swap activity. 3635639b7e3SSascha WildnerThe fields are as follows: 3645639b7e3SSascha Wildner.Bl -tag -width "Active:" -offset indent 3655639b7e3SSascha Wildner.It Active: 366c6da48e4SSascha Wildnernumber of pages active 3675639b7e3SSascha Wildner.It Inact: 368c6da48e4SSascha Wildnernumber of pages inactive 3695639b7e3SSascha Wildner.It Wired: 370c6da48e4SSascha Wildnernumber of pages wired down, including cached file data pages 3715639b7e3SSascha Wildner.It Cache: 372c6da48e4SSascha Wildnernumber of pages used for VM-level disk caching 3735639b7e3SSascha Wildner.It Buf: 374c6da48e4SSascha Wildnernumber of pages used for BIO-level disk caching 3755639b7e3SSascha Wildner.It Free: 376c6da48e4SSascha Wildnernumber of pages free 3775639b7e3SSascha Wildner.It Total: 378c6da48e4SSascha Wildnertotal available swap usage 3795639b7e3SSascha Wildner.It Free: 380c6da48e4SSascha Wildnertotal free swap usage 3815639b7e3SSascha Wildner.It Inuse: 382c6da48e4SSascha Wildnerswap usage 3835639b7e3SSascha Wildner.It In: 384c6da48e4SSascha Wildnerpages paged in from swap devices (last interval) 3855639b7e3SSascha Wildner.It Out: 386c6da48e4SSascha Wildnerpages paged out to swap devices (last interval) 3875639b7e3SSascha Wildner.It K: 388c6da48e4SSascha WildnerKilobyte 3895639b7e3SSascha Wildner.It M: 390c6da48e4SSascha WildnerMegabyte 3915639b7e3SSascha Wildner.It %: 392c6da48e4SSascha Wildner1/100 3935639b7e3SSascha Wildner.El 3945639b7e3SSascha Wildner.Pp 395c6da48e4SSascha WildnerThe remainder of the screen displays information about individual 3965639b7e3SSascha Wildnerprocesses. 3975639b7e3SSascha WildnerThis display is similar in spirit to 3985639b7e3SSascha Wildner.Xr ps 1 , 3995639b7e3SSascha Wildnerbut it is not exactly the same. 4005639b7e3SSascha WildnerThe columns displayed by top will differ slightly between operating systems. 4015639b7e3SSascha WildnerGenerally, the following fields are displayed: 4025639b7e3SSascha Wildner.Bl -tag -width "USERNAME" -offset indent 4035639b7e3SSascha Wildner.It PID 404c6da48e4SSascha WildnerThe process id. 4055639b7e3SSascha Wildner.It USERNAME 406c6da48e4SSascha WildnerUsername of the process's owner (if 4075639b7e3SSascha Wildner.Fl u 408c6da48e4SSascha Wildneris specified, a UID column will be substituted for USERNAME). 4095639b7e3SSascha Wildner.It NICE 410c6da48e4SSascha WildnerNice amount in the range \-20 to 20, as established by the use of 411c6da48e4SSascha Wildnerthe command 4125639b7e3SSascha Wildner.Xr nice 1 . 4135639b7e3SSascha Wildner.It SIZE 414c6da48e4SSascha WildnerTotal size of the process (text, data, and stack) given in kilobytes. 415f90ff76fSAntonio Huete Jimenez.It RES 416f90ff76fSAntonio Huete JimenezResident memory: current amount of process memory that resides in physical 417f90ff76fSAntonio Huete Jimenezmemory, given in kilobytes, megabytes or gigabytes depending on the size to be reported. 4185639b7e3SSascha Wildner.It STATE 4198c086bfbSAaron LICurrent state, may be: 4208c086bfbSAaron LI.Sq START , 4218c086bfbSAaron LI.Sq RUN 4228c086bfbSAaron LI(shown as 4238c086bfbSAaron LI.Sq CPUn 4248c086bfbSAaron LIon SMP systems), 4258c086bfbSAaron LI.Sq SLEEP 4268c086bfbSAaron LI(generally shown as the event on which the process waits), 4278c086bfbSAaron LI.Sq STOP , 428*7a491db4SAaron LI.Sq ZOMBIE , 4295639b7e3SSascha Wildneror 430*7a491db4SAaron LI.Sq DUMP . 4315639b7e3SSascha Wildner.It C 432f25fea26SJan LentferNumber of CPU the process is currently running on (only on multi-CPU machines). 4335639b7e3SSascha Wildner.It TIME 434c6da48e4SSascha WildnerNumber of system and user cpu seconds that the process has used. 4355639b7e3SSascha Wildner.It CTIME 4365639b7e3SSascha WildnerThe cumulated CPU time of the process and its exited children. 4375639b7e3SSascha WildnerThis value is similar to what 4385639b7e3SSascha Wildner.Xr ps 1 439c6da48e4SSascha Wildnerdisplays as CPU time when run with the 4405639b7e3SSascha Wildner.Fl S 441c6da48e4SSascha Wildneroption. 4425639b7e3SSascha Wildner.It CPU 443c6da48e4SSascha WildnerPercentage of available cpu time used by this process. 4445639b7e3SSascha Wildner.It COMMAND 445c6da48e4SSascha WildnerName of the command that the process is currently running. 4465639b7e3SSascha Wildner.El 4475639b7e3SSascha Wildner.Ss COLOR 4485639b7e3SSascha WildnerTop supports the use of ANSI color in its output. 4495639b7e3SSascha WildnerBy default, color is available but not used. 4505639b7e3SSascha WildnerThe environment variable 4515639b7e3SSascha Wildner.Ev TOPCOLORS 452c6da48e4SSascha Wildnerspecifies colors to use and conditions for which they should be used. 4535639b7e3SSascha WildnerAt the present time, only numbers in the summary display area can be 4545639b7e3SSascha Wildnercolored. 4555639b7e3SSascha WildnerIn a future version it will be possible to highlight numbers 4565639b7e3SSascha Wildnerin the process display area as well. 4575639b7e3SSascha WildnerThe environment variable is the only way to specify color: 4585639b7e3SSascha Wildnerthere is no equivalent command line option. 459c6da48e4SSascha WildnerNote that the environment variable 4605639b7e3SSascha Wildner.Ev TOPCOLOURS 4615639b7e3SSascha Wildneris also understood. 4625639b7e3SSascha WildnerThe British spelling takes precedence. 4635639b7e3SSascha WildnerThe use of color only works on terminals that understand and process 4645639b7e3SSascha WildnerANSI color escape sequences. 4655639b7e3SSascha Wildner.Pp 466c6da48e4SSascha WildnerYou can see a list of color codes recognized by this installation of top 467c6da48e4SSascha Wildnerwith the 4685639b7e3SSascha Wildner.Fl T 4695639b7e3SSascha Wildneroption. 4705639b7e3SSascha WildnerThis will also show the current set of tests used for 471c6da48e4SSascha Wildnercolor highligting, as specified in the environment. 4725639b7e3SSascha Wildner.Sh ENVIRONMENT 4735639b7e3SSascha WildnerThe following environment variables affect the execution of 4745639b7e3SSascha Wildner.Nm : 4755639b7e3SSascha Wildner.Bl -tag -width "TOPCOLORS" 4765639b7e3SSascha Wildner.It Ev TOP 4775639b7e3SSascha WildnerThe environment variable 4785639b7e3SSascha Wildner.Ev TOP 4795639b7e3SSascha Wildneris examined for options before the command line is scanned. 4805639b7e3SSascha WildnerThis enables a user to set his or her own defaults. 4815639b7e3SSascha WildnerThe number of processes to display 4825639b7e3SSascha Wildnercan also be specified in the environment variable 4835639b7e3SSascha Wildner.Ev TOP . 4845639b7e3SSascha WildnerThe options 4855639b7e3SSascha Wildner.Dq Fl C , 4865639b7e3SSascha Wildner.Dq Fl I , 4875639b7e3SSascha Wildner.Dq Fl S , 4885639b7e3SSascha Wildnerand 4895639b7e3SSascha Wildner.Dq Fl u 4905639b7e3SSascha Wildnerare actually toggles. 4915639b7e3SSascha WildnerA second specification of any of these options will negate the first. 4925639b7e3SSascha WildnerThus a user who has the environment variable 4935639b7e3SSascha Wildner.Ev TOP 4945639b7e3SSascha Wildnerset to 4955639b7e3SSascha Wildner.Dq Fl I 4965639b7e3SSascha Wildnermay use the command 4975639b7e3SSascha Wildner.Dq Nm Fl I 4985639b7e3SSascha Wildnerto see idle processes. 4995639b7e3SSascha Wildner.It Ev TOPCOLORS 5005639b7e3SSascha WildnerThe environment variable is a sequence of color specifications, separated 5015639b7e3SSascha Wildnerby colons. 5025639b7e3SSascha WildnerEach specification takes the form tag=min,max#code where 5035639b7e3SSascha Wildner.Li tag 5045639b7e3SSascha Wildneris the name of the value to check, 5055639b7e3SSascha Wildner.Li min 5065639b7e3SSascha Wildnerand 5075639b7e3SSascha Wildner.Li max 5085639b7e3SSascha Wildnerspecify a range for the value, and 5095639b7e3SSascha Wildner.Li code 5105639b7e3SSascha Wildneris an ANSI color code. 5115639b7e3SSascha WildnerMultiple color codes can be listed and separated with semi-colons. 5125639b7e3SSascha WildnerA missing 5135639b7e3SSascha Wildner.Li min 5145639b7e3SSascha Wildnerimplies the lowest possible value (usually 0) 5155639b7e3SSascha Wildnerand a missing 5165639b7e3SSascha Wildner.Li max 5175639b7e3SSascha Wildnerimplies infinity. 5185639b7e3SSascha WildnerThe comma must always be present. 5195639b7e3SSascha WildnerWhen specifying numbers for load averages, they should be multiplied by 100. 5205639b7e3SSascha WildnerFor example, the specification 5215639b7e3SSascha Wildner.Li 1min=500,1000#31 5225639b7e3SSascha Wildnerindicates that a 1 minute load average between 5235639b7e3SSascha Wildner5 and 10 should be displayed in red. 5245639b7e3SSascha WildnerColor attributes can be combined. 5255639b7e3SSascha WildnerFor example, the specification 5265639b7e3SSascha Wildner.Li 5min=1000,#37;41 5275639b7e3SSascha Wildnerindicates that a 5 minute load average higher than 10 should be displayed 5285639b7e3SSascha Wildnerwith white characters on a red background. 5295639b7e3SSascha WildnerA special tag named 5305639b7e3SSascha Wildner.Li header 5315639b7e3SSascha Wildneris used to control the color of the header for process display. 5325639b7e3SSascha WildnerIt should be specified with no lower and upper limits, specifically 5335639b7e3SSascha Wildner.Li header=,# 5345639b7e3SSascha Wildnerfollowed by the ANSI color code. 5355639b7e3SSascha Wildner.El 5365639b7e3SSascha Wildner.Sh SEE ALSO 5375639b7e3SSascha Wildner.Xr kill 1 , 5385639b7e3SSascha Wildner.Xr ps 1 , 5395639b7e3SSascha Wildner.Xr stty 1 , 5405639b7e3SSascha Wildner.Xr mem 4 , 5415639b7e3SSascha Wildner.Xr renice 8 5425639b7e3SSascha Wildner.Sh AUTHORS 5435639b7e3SSascha Wildner.An William LeFebvre 5445639b7e3SSascha Wildner.Sh BUGS 545c6da48e4SSascha WildnerAs with 5465639b7e3SSascha Wildner.Xr ps 1 , 547c6da48e4SSascha Wildnerthings can change while 5485639b7e3SSascha Wildner.Nm 5495639b7e3SSascha Wildneris collecting information for an update. 5505639b7e3SSascha WildnerThe picture it gives is only a close approximation to reality. 5515639b7e3SSascha Wildner.\" .Sh COPYRIGHT 5525639b7e3SSascha Wildner.\" Copyright (C) 1984-2007 William LeFebvre. 5535639b7e3SSascha Wildner.\" For additional licensing information, see 5545639b7e3SSascha Wildner.\" http://www.unixtop.org/license/ 555