Top 5 Linux System Monitoring Commands

No replies
Anonymous

Top 5 Linux System Monitoring Commands and Usages

Command: top
This command provides lots of information on the processes running, including the percentage of CPU and Memory. It also shows who ‘OWNS’ the process, the process ID (PID) and how many percentage of resources being consumed by the process. This is the one stop shop for the summary on what is going on with the computer.

Figure 1: Shows the current process with PID, User, Priority,%CPU, % Memory and command that is being executed.
For more command options when using the “top”, see the manual or $top –help

Command: du
When executing this command, it will show you the disk usage of each directory and sub-directories. It is very useful to check what directory is consuming a lot of disk space.

Figure 2: directory disk usage display file in KB size.
For more command options when using the “du”, see the manual or $du --help

Command: df
Checking the free space on all mounted file systems is crucial also on system as not to provide disk over quota. You can specify also the device you want to check but it need to be mounted first.

Figure 3: df command showing the free spaces on mounted drives and volumes.

Command: ps
‘ps’ will show you the what programs (process) you are currently running on your machine. You can do search for a certain program by using PID or by using the UID. It is one of the most important as you need to kill or free up some idle or zombie processes which sucks out the resources.

Figure 4: ps –aux is showing all the process running on the machine.

Command: who
Mostly system administrators are monitoring who the people are logging in on what time and which terminal there log-in unto. The “who” command solves this scenario.

Figure 5: who command showing the user and terminal they log-in into.