


TOP(1)		Linux Programmer's Manual		TOP(1)


NNAAMMEE
       top - display top CPU processes

SSYYNNOOPPSSIISS
       top

DDEESSCCRRIIPPTTIIOONN
       ttoopp provides an ongoing look at processor activity. At any
       time, top displays CPU activity	since  the  last  update.
       This man page documents the /proc-based version of top, or
       tries to.


CCOOMMMMAANNDD--LLIINNEE OOPPTTIIOONNSS
       There are no command line arguments to top at this time.


FFIIEELLDD DDEESSCCRRIIPPTTIIOONNSS
       Top displays a variety of information about the	processor
       state.  The display is updated every 5 seconds by default.

       llooaadd aavveerraaggeess
	    This line displays the three load  averages	for  the
	    system.  Unfortunately, I don't really know what load
	    averages are, except that they are a measure  of  CPU
	    load.

       pprroocceesssseess
	    The	total number of processes running at the time of
	    the last update. Also breaks this down into the  num-
	    ber of tasks which are running, sleeping, stopped, or
	    zombies.

       CCPPUU ssttaatteess
	    Shows the percentage of CPU time in user mode, system
	    mode,  running niced tasks, and idle. Note that niced
	    tasks are only those whose nice  value  is	negative.
	    Also  time	spent in niced tasks will also be counted
	    in either system or user  time,  so	the  total  will
	    appear to be more than 100%.

       MMeemm  Displays memory usage, including total available mem-
	    ory, free memory, used  memory,  shared  memory,  and
	    memory used for buffers.

       SSwwaapp Shows statistics for swap space, including total swap
	    space, available swap space, and used swap space.

       PPIIDD  The process ID of each task which is running is shown
	    in this column.

       UUSSEERR The	user  name  of the task's owner is shown in this
	    column




Linux			Feb 1 1993				1





TOP(1)		Linux Programmer's Manual		TOP(1)


       PPRRII  The priority of the task is shown here

       NNII   The nice value of the task is  shown  here.	Negative
	    nice values are lower priority.

       SSIIZZEE The	size  of  the	task's	code plus data plus stack
	    space, in kilobytes, is shown here.

       RRSSSS  The total amount of physical memory used by the task,
	    in kilobtes, is shown here.

       SSHHRRDD The amount of shared memory used by the task is shown
	    in this column.

       SSTT   The state of the task is shown  here.  The	state  is
	    either S for sleeping, D for uninterruptible sleep, R
	    for running, Z for	zombies,  or  T	for  stopped  or
	    traced.

       TTIIMMEE The task's CPU time since it started is shown here.

       %%CCPPUU The	task's	share	of  the	CPU  time since the last
	    screen update  is  shown  in  this	column.	This  is
	    expressed as a percentage of total CPU time.

       %%MMEEMM The	task's	share	of  the	physical memory is shown
	    here.

       CCOOMMMMAANNDD
	    The task's command name is shown here.


IINNTTEERRAACCTTIIVVEE CCOOMMMMAANNDDSS
       Several single key commands are recognized  while  top  is
       running.

       hh    This causes a help screen to be displayed.

       ??    Same as h.

       qq    Quit

       nn    Change  the	number of processes to show. You will be
	    prompted to enter the number. This	over-rides  auto-
	    matic  determination  of  the  number of processes to
	    show, which is based window size measurement. If n is
	    not	specified,  then top will show as many processes
	    as will fit on the screen.

       ##    Same as n.

       kk    Kill a process. You will be prompted for the  PID  of
	    the	task, and the signal to send to it. For a normal
	    kill, send signal 15. For a sure, but  rather  abrupt



Linux			Feb 1 1993				2





TOP(1)		Linux Programmer's Manual		TOP(1)


	    kill, send signal 9.

       rr    Re-nice  a	process. You will be prompted for the PID
	    of the task, and the value to nice it to. Entering	a
	    positve  value  will  cause a process to get niced to
	    negative values, and loose priority. If root is  run-
	    ning  top, a negative value can be entered, causing a
	    process to get a higher than normal priority.

       ss    Change  the	delay	between	updates.  You	will   be
	    prompted to enter the delay time, in seconds, between
	    updates. Fractional values	are  recognized	down  to
	    microseconds.  Entering  0 causes continuous updates.
	    The default value is 5 seconds.

       ^^LL   Erases are re-draws the screen.


UUPPDDAATTIINNGG
       This proc-based top works by reading the files in the proc
       filesystem, mounted on /proc.


NNOOTTEESS
       Programs swapped out to disk will be shown without command
       line arguments.

       %CPU shows the cputime/realtime percentage in  the  period
       of  time	between  updates.  For the first update, a short
       delay is used, and top itself  dominates	the  CPU  usage.
       After  that, top will fall back, and a more reliable esti-
       mate of CPU usage is available

       The SIZE and RSS fields don't count the	page  tables  and
       the  task_struct of a proc, this is at least 12k of memory
       that is always resident. SIZE is the virtual size  of  the
       proc (code+data+stack).


BBUUGGSS
       Does  not  format the screen correctly if the screen width
       is less than about 70  characters.  Also,  if  the  screen
       height is less than 7 lines, formatting is incorrect.

       Some  handy command line arguments are missing (like -q to
       run at extra high priority).

AAUUTTHHOORR
       ttoopp was originally written by Roger Binns, based on Branko
       Lankester's   (lankeste@fwi.uva.nl)  ps	program.   Robert
       Nation  (nation@rocket.sanders.lockheed.com  re-wrote   it
       significantly to use the proc filesystem, based on Michael
       K Johnson's (johnsonm@stolaf.edu) proc-based ps program.




Linux			Feb 1 1993				3


