4 Top Command Howto on Linux RHEL 6/CentOS 6

In this article, i will help you to explore most frequently used top commands that linux system administrator use when analyzing the linux performance and use for daily system administrative jobs. Top command displays system summary information such as tasks currently being managed by the Linux kernel, displays ongoing look at processor activity in real time and will displays a listing of the most CPU-intensive tasks on the system. It also will show the processor and memory are being used and other information like running processes. It will help you to summarize how much of your system’s resources are taking up.

1. How to display top command result :

[root@rhel6 ~]# top

This command will show information like tasks, memory, cpu load average, swap and number of users. Press ‘q’ to quit window.

2. How to display selected user using top -u :

[root@rhel6 ~]# top -u apache

3. How to display specific process with given PIDs Using top -p(e.g PID 2449, 2450) :

[root@rhel6 ~]# top -p 2449,2450

4. How to quit top command after a specified number of iterations :

[root@rhel6 ~]# top -n 10

This top command will automatically exit after 10 number of repetition.