Wednesday, September 14, 2011

Top Command

Displays CPU processes in a full-screen GUI. A great way to see the
activity on your computer in real-time. Type “Q” to quit.

Press M

By default top command displays the processes in the order of CPU usage.  When the top command is running, press M (upper-case) to display processes sorted by memory usage as shown below.

Press O

To sort top output by any column

Press K

Kill a Task Without Exiting From Top

Display Selected User in Top Output Using 

$ top -u vishu

Change Refresh Interval

Press Space bar and then d.Now type the required interval.

Press z or b

Highlight Running Processes in the Linux Top Command Output

Press n

Decrease Number of Processes Displayed in Top Output

The PID column can then be matched with the SPID column on the V$PROCESS view to provide more information on the process.

SELECT a.username, 
FROM   v$session a,
       v$process b
WHERE  a.paddr = b.addr
AND    spid = '&pid';