Display top CPU processes
by Sanju[ Edit ] 2009-10-29 18:00:43
Display top CPU processes
To know the process which is running in your system just use the following command:
top
Command Line Options
-d Specifies the delay between screen updates. You can change this with the s interactive command.
-p Monitor only processes with given process id. This flag can be given up to twenty times. This option is neither available interactively nor can it be put into the configuration file.
-q This causes top to refresh without any delay. If the caller has superuser privileges, top runs with the highest possible priority.
-S Specifies cumulative mode, where each process is listed with the CPU time that it as well as its dead children has spent. This is like the -S flag to ps(1). See the discussion below of the S interactive command.
-s Tells top to run in secure mode. This disables the potentially dangerous of the interactive commands (see below). A secure top is a nifty thing to leave running on a spare terminal.
-i Start top ignoring any idle or zombie processes. See the interactive command i below.
-C display total CPU states instead of individual CPUs. This option only affects SMP systems.
-c display command line instead of the command name only. The default behavior has been changed as this seems to be more useful.
-H Show all threads.
-n Number of iterations. Update the display this number of times and then exit.
-b Batch mode. Useful for sending output from top to other programs or to a file. In this mode, top will not accept command line input. It runs until it produces the number of iterations requested with the n option or until killed. Output is plain text suitable for display on a dumb terminal.