Linux System Monitoring Tool - 'top'

sohail
sohail

Table of Contents

I used to use Windows, but now I use Linux. When I first started using Linux, one of the first things I did was learn about the processes that were running in the background. In Windows, we have a graphical task manager. In Linux, there are numerous task managers that are both GUI and CLI. In this article, I’ll discuss ‘top,’ a simple CLI Linux system monitoring tool.

Linux System Monitoring Tool ‘top’

top is a Linux system monitoring tool that can be used to view the processes that are running in the operating system’s background. Similarly to how I had a task manager in Windows operating systems. top differs from Task Manager in that Task Manager has a graphical user interface while top has a command-line interface.

linux system monitoring tool

It’s Simple To Use!

To run ‘top,’ open terminal and type “top” without the quotation marks, then press return. It will display all of the processes that are currently running in the background. You will notice that the table in your terminal is being updated every three seconds, and you can change that interval time by pressing “s” without quotation marks and entering the number. This number represents a time interval in seconds that you can enter to change the interval. For example, if you type 1 and press return, the process table will be updated every second.

top s argument to change time period

How To Kill A Process Using Top?

There will be a long list of processes running in the background. You can hide all processes that are not using your CPU by pressing ‘i’ without the quotation marks. You now only have CPU-intensive processes in front of you. If you want to kill a process, you must first look at its PID number. This is a process ID that you can use to terminate it. You can see the process in the table’s very last column, and then make a note of the PID.

linux monitoring tool

Once you know the PID, you can press “k” without quotation marks and then type PID and hit return twice. You will see that the process will be killed.

Linux toolsUncategorizedtutorial