Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com

This Blog is protected by DMCA.com

huuphan.com. Powered by Blogger.

top command in linux

I guide to the Linux "Top command". The top command allow monitor processes and system resource usage on Linux. It is a best tools for system admin.

Top command in linux

Getting start top command

you can type "top" in terminal very simple.
[[email protected] huuphan.com]$ top
 If you want to quit, then press "q"



The screen output terminal as below


top command in linux



Top command usage example

How to killing processes, sorting the process list, showing full paths, forest view and Listing processes from an user.

Killing processes

you want to kill a process, press "k" when top command is running and ask for the process ID and press enter. If you leave the process ID blank and hit enter.

top command in linux 1

Sorting the process list

The most frequent reasons to use a tool like top is to find out the consuming the most resources. you can press key for sorting list.
  • ‘M’ to sort by memory usage
  • ‘P’ to sort by CPU usage
  • ‘N’ to sort by process ID
  • ‘T’ to sort by the running time

Showing full paths

The default, top command not show full path for program. You press "c" while top is running. and Press "c" again to go backup the default.

top command in linux

Forest view

you want to see the child-parent hierarchy of process. To view forest by pressing "v"/"V" while top is running.
top command in linux

Listing processes from an user

To list processes from a certain user, press ‘u’ when top is running. or leave it blank to display processes for all users.
top command in linux

Conclusion

Top command is helpful for monitoring and managing processes on a Linux system.

Thanks for reading top command in linux My blog Zimbra Mail Server,linux,bash script,centos,linux command I hope this is useful.

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com