
Top 12 linux Commands Examples
This is the a part of our on-going collection of instructions in Linux. We have included fundamental ls command and cat command. In this article, we're seeking to discover pinnacle command that's one of the maximum often used instructions in our each day device administrative jobs. pinnacle command shows processor pastime of your Linux container and additionally shows obligations controlled via way of means of kernel in real-time. It’ll display processor and reminiscence are getting used and different facts like strolling processes. This can also additionally assist you to take accurate action. pinnacle command located in UNIX-like running systems. Linux Top Command Examples You may be inquisitive about following tutorials
Htop (Linux Process Monitoring) tool for RHEL, CentOS & Fedora Iotop (Monitor Linux Disk I/O) in RHEL, CentOS and Fedora
1. Display of Top Command
In this command example, it will show information of system like tasks, memory, cpu and swap. Press ‘q‘ to quit window. # top Linux Top Command2. Sorting with Uppercase Letter ‘O’.
Press Shift+O to Sort field using field letter, for example press ‘a‘ letter to sort process with Process ID. Sorting Process ID with Top
Type any key to return to main top window with sorted PID (Process ID) order as shown in below screen. Press ‘q‘ to quit exit the window. Sorting Process ID
Type any key to return to main top window with sorted PID (Process ID) order as shown in below screen. Press ‘q‘ to quit exit the window. Sorting Process ID
3. Display Specific Users Process.
Use top command with ‘u‘ option will display specific User process details. # top -u tecmint Top with Specific User Processes4. Highlight Running Process in Top
Press ‘z‘ option in running top command will display running process in color which may help you to identified running process easily. Top Process with Colorful5. Shows Absolute Path of Processes
Press ‘c‘ option in running top command, it will display absolute path of running process. Top with Specific Process Path6. Change Delay or Set ‘Screen Refresh Interval’ in Top
By default screen refresh interval is 3.0 seconds, same can be change pressing ‘d‘ option in running top command and change it as desired as shown below. Top – Set Refresh Time7. Kill running process with argument ‘k’
You can kill a process after finding PID of process by pressing ‘k‘ option in running top command without exiting from top window as shown below. Top – Kill Process ID8. Sort by CPU Utilisation
Press Shift+P to sort processes as per CPU utilization. See screenshot below. Top – High CPU Utilization9. Renice a Process
You can use ‘r‘ option to change the priority of the process also called Renice. Top – Renice Process10. Save Top Command Results
To save the running top command results output to a file /root/.toprc use the following command. # top -n 1 -b > top-output.txtTop Command Save Results
0 Comments:
If you have any questions comment here