10 Types of TOP Command on Linux / Unix with Examples
Linux / Unix, TOP command is very helpful to displying current running on system status. Update and display top CPU processes periodically. We can view different types of processing status by using keys.
We can get information easily from Top Command usage,
Server Up time
Users Logged on system
Server Load average
View Number of Task
View Number CPU`s (Core)
RAM Memory usage (Usage, Buffer, Free)
SWAP Memory usage (Usage, free, Cached)
D : uninterruptible sleep
R : running status
S : sleeping status
T : traced or stopped
Z : zombie process
PID : Process ID.
USER : The user name who runs the process.
PR : Priority
NI : Nice value
%CPU : CPU usage
TIME : CPU Time
%MEM : Memory usage
VIRT : Virtual Image (kb)
SWAP : Swapped size (kb)
RES : Resident size (kb)
S : Process Status
1. CPU process command: top
This command shows infomattion about like, Processes, Memory usage (RAM, SWAP), CPU Load average.
2. Display specific user process: top -u
If you use -u option specifies display specific user process information,
3. Time delay top -d secs.tenths
Use -d option specifies the Delay-time interval between screen updates as below command every 3 seconds updates automatically
Interactive running TOP command by Keys:
4. Command help?:
If press h or ?
This will be dispalys the help page and press 'q' for quit.
5. Update Status
If press space bar Immediately update display
6. To Kill Specific Process
If press k asking process id which is want to kill. By default get 1 st PID or you can enter PID which you want to kill process.
Then, enter 9, then press enter button.
7. Display process status
If you precess (SHIFT + P) shows information order by top process
8. Display Memory status
If you precess (SHIFT + M) shows information order by top Memory usage process
9. Highlight with Color Running Process in Top
If you Press 'z' option is will display running process with color for identified running process.
10. Save Top Command Reports :
If you will Press Shift+W to save the running top command results under /root/.toprc.