SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 5.X procps-1.2.7-1.i386.rpm

TOP

Section: Linux Programmer's Manual (1)
Updated: Feb 1 1993
Index 

NAME

top - display top CPU processes 

SYNOPSIS

top[-][ddelay][q][c][S][s][i] 

DESCRIPTION

topprovides an ongoing look at processor activity in real time. Itdisplays a listing of the most CPU-intensive tasks on the system, andcan provide an interactive interface for manipulating processes.It can sort the tasks by CPU usage, memory usage and runtime.can be better configured than the standard top from the procps suite.Most features can either be selected by an interactive command or by specifying the feature in the personal or system-wide configurationfile. See below for more information.

 

COMMAND-LINE OPTIONS

dSpecifies the delay between screen updates. You can change this withthesinteractive command.qThis causestopto refresh without any delay. If the caller has superuser priviledges,top runs with the highest possible priority.SSpecifies cumulative mode, where each process is listed with the CPUtime that itas well as its dead childrenhas spent. This is like the-Sflag tops(1).See the discussion below of theSinteractive command.sTellstopto run in secure mode. This disables the potentially dangerous of theinteractive commands (see below). A securetopis a nifty thing to leave running on a spare terminal.iStarttopignoring any idle or zombie processes. See the interactive commandibelow.cdisplay command line instead of the command name only. The defaultbehaviour has been changed as this seems to be more useful. 

FIELD DESCRIPTIONS

topdisplays a variety of information about the processor state. Thedisplay is updated every 5 seconds by default, but you can change thatwith thedcommand-line option or thesinteractive command."uptime"This line displays the time the system has been up, and the three loadaverages for the system. The load averages are the average number ofprocess ready to run during the last 1, 5 and 15 minutes. This line isjust like the output ofuptime(1).The uptime display may be toggled by the interactive lcommand.processesThe total number of processes running at the time of the last update.This is also broken down into the number of tasks which are running,sleeping, stopped, or undead. The processes and states display may betoggled by the tinteractive command."CPU states"Shows the percentage of CPU time in user mode, system mode, niced tasks,and idle. (Niced tasks are only those whose nice value is negative.)Time spent in niced tasks will also be counted in system and user time,so the total will be more than 100%. The processes and states displaymay betoggled by thetinteractive command.MemStatistics on memory usage, including total available memory, freememory, used memory, shared memory, and memory used for buffers. Thedisplay of memory information may be toggled by theminteractive command.SwapStatistics on swap space, including total swap space, available swapspace, and used swap space. This andMemare just like the output offree(1).PIDThe process ID of each task.PPIDThe parent process ID each task.UIDThe user ID of the task's owner.USERThe user name of the task's owner.PRIThe priority of the task.NIThe nice value of the task. Negative nice values are lower priority.SIZEThe size of the task's code plus data plus stack space, in kilobytes,is shown here.TSIZEThe code size of the task. This gives strange values for kernelprocesses and is broken for ELF processes.DSIZEData + Stack size. This is broken for ELF processes.TRSText resident size.SWAPSize of the swapped out part of the task.DSize of pages marked dirty.LIB Size of use library pages. This does not work for ELF processes.RSSThe total amount of physical memory used by the task, in kilobytes, isshown here. For ELF processes used library pages are counted here, fora.out processes not.SHAREThe amount of shared memory used by the task is shown in this column.STATThe state of the task is shown here. The state is eitherSfor sleeping,Dfor uninterruptible sleep,Rfor running,Zfor zombies, orTfor stopped or traced. These staes are modified by trailing<for a process with negative nice value,Nfor a process with positive nice value,Wfor a swapped out process (this does not work correctly for kernelprocesses).WCHANdepending on the availablity of either /boot/psdatabaseor the kernel link map/boot/System.mapthis shows the address or the name of the kernel function the taskcurrently is sleeping in.TIMETotal CPU time the task has used since it started. If cumulative modeis on, this also includes the CPU time used by the process's childrenwhich have died. You can set cumulative mode with theScommand line option or toggle it with the interactive commandS.The header line will then be changed to CTIME.%CPUThe task's share of the CPU time since the last screen update, expressedas a percentage of total CPU time.%MEMThe task's share of the physical memory.COMMANDThe task's command name, which will be truncated if it is too long to bedisplayed on one line. Tasks in memory will have a full command line,but swapped-out tasks will only have the name of the program inparentheses (for example, "(getty)")."A , WP"these fields from the kmem top are not supported. 

INTERACTIVE COMMANDS

Several single-key commands are recognized whiletopis running. Some are disabled if thesoption has been given on the command line.spaceImmediately updates the display.^LErases and redraws the screen."h or ?"Displays a help screen giving a brief summary of commands, and thestatus of secure and cumulative modes.kKill a process. You will be prompted for the PID of the task, and thesignal to send to it. For a normal kill, send signal 15. For a sure,but rather abrupt, kill, send signal 9. The default signal, as withkill(1),is 15,SIGTERM.This command is not available in secure mode.iIgnore idle and zombie processes. This is a toggle switch."n or #"Change the number of processes to show. You will be prompted to enterthe number. This overrides automatic determination of the number ofprocesses to show, which is based on window size measurement. If 0 isspecified, then top will show as many processes as will fit on thescreen; this is the default.qQuit.rRe-nice a process. You will be prompted for the PID of the task, andthe value to nice it to. Entering a positve value will cause a processto be niced to negative values, and lose priority. If root is runningtop,a negative value can be entered, causing a process to get a higher thannormal priority. The default renice value is 10. This command is notavailable in secure mode.SThis toggles cumulative mode, the equivalent ofps -S,i.e., that CPU times will include a process's defunct children. Forsome programs, such as compilers, which work by forking into manyseperate tasks, normal mode will make them appear less demanding thanthey actually are. For others, however, such as shells andinit,this behavior is correct. In any case, try cumulative mode for analternative view of CPU use.sChange the delay between updates. You will be prompted to enter thedelay time, in seconds, between updates. Fractional values arerecognized down to microseconds. Entering 0 causes continuous updates.The default value is 5 seconds. Note that low values cause nearlyunreadably fast displays, and greatly raise the load. This command isnot available in secure mode."f or F"Add fields to display or remove fields from the display. See below formore information."o or O"Change order of displayed fields. See below for more information.ltoggle display of load average and uptime information.mtoggle display of memory information.ttoggle display of processes and CPU states information.ctoggle display of command name or full command line.Msort tasks by resident memory usage.Psort tasks by CPU usage (default).Tsort tasks by time / cumulative time.WWrite current setup to ~/.toprc.This is the recommended way to write a top configuration file. 

The Field and Order Screens

After pressing f,F,oorOyou will be shown a screen specifying the field order on the top lineand short descriptions of the field contents. The field order stringuses the following syntax: If the letter in the filed stringcorresponding to a field is upper case, the field will be displayed.This is furthermore indicated by an asterisk in front of the fielddescription.The order of the fields corresponds to the order of the letters in thestring.
 From the field select screen you can toggle the display of a field bypressing the corresponding letter.
 From the order screen you may move a field to the left by pressingthe corresponding upper case letter resp. to the right by pressing thelower case one. 

Configuration Files

Top reads it's default configuration from two files,/etc/toprcand~/.toprc.The global configuration file may be used to restrict the usage of topto the secure mode for non-priviledged users. If this is desired, thefile should contain a 's' to specify secure mode and a digit d (2<=d<=9)for the default delay (in seconds) on a single line.The personal configuration file contains two lines. The first linecontains lower and upper letters to specify which fields in whatorder are to be displayed. The letters correspond to the letters in theFields or Order screens from top. As this is not very instructive, it isrecommended to select fields and order in a running top process and tosave this using the Winteractive command. The second line is more interesting (and important). It containsinformation on the other options. Most important, if you have saved aconfiguration in secure mode, you will not get an insecure top withoutremoving the lower 's' from the second line of your ~/.toprc.A digit specifies the delay time between updates, a capital 'S'cumulative mode, a lower 'i' no-idle mode. As in interactive mode, alower 'm', 'l', and 't' suppresses the display of memory, uptime resp.process and CPU state information.Currently changing the default sorting order (by CPU usage) is not supported. 

NOTES

Thisproc-basedtopworks by reading the files in theprocfilesystem,mounted on/proc.If/procis not mounted,topwill not work.

%CPUshows the cputime/realtime percentage in the period of time between updates. For the first update, a short delay is used, andtopitself dominates the CPU usage. After that,topwill drop back, and a more reliable estimate of CPU usage is available.

TheSIZEandRSS fields don't count the page tables and thetask_structof a process; this is at least 12K of memory that is always resident.SIZEis the virtual size of the process (code+data+stack).

Keep in mind that a process must die for its time to be recorded on itsparent by cumulative mode. Perhaps more useful behavior would be tofollow each process upwards, adding time, but that would be moreexpensive, possibly prohibitively so. In any case, that would maketop'sbehavior incompatible withps. 

FILES

/etc/toprc The global configuration file. ~/.toprcThe personal configuration file. 

SEE ALSO

ps(1),free(1),uptime(1),kill(1),renice(1). 

BUGS

If the window is less than about 70x7,topwill not format information correctly.
 Many fields still have problems with ELF processes.
 the help screens are not yet optimized for windows with less than 25 lines 

AUTHOR

topwas originally written by Roger Binns, based on Branko Lankester's<lankesteAATTfwi.uva.nl> ps program.Robert Nation <nationAATTrocket.sanders.lockheed.com> re-wrote itsignificantly to use the proc filesystem, based on Michael K. Johnson's<johnsonmAATTredhat.com> proc-based ps program.Michael Shields <mjshieldAATTnyx.cs.du.edu> made many changes, includingsecure and cumulative modes and a general cleanup.

Helmut Geyer <Helmut.GeyerAATTiwr.uni-heidelberg.de>Heavily changed it to include support for configurable fields and othernew options, and did further cleanup and use of the new readproc interface.

Michael K. Johnson <johnsonmAATTredhat.com> is now the maintainer.

Please send bug reports to <procps-bugsAATTredhat.com>


 

Index

NAME
SYNOPSIS
DESCRIPTION
COMMAND-LINE OPTIONS
FIELD DESCRIPTIONS
INTERACTIVE COMMANDS
The Field and Order Screens
Configuration Files
NOTES
FILES
SEE ALSO
BUGS
AUTHOR

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector