How to use the `htop ` command to check memory usage in Linux. In Linux
htop is an interactive process viewer. This command is similar to top command except that it allows to scroll vertically and horizontally to allows users to view all processes running on the system, along with their full command line as well as viewing them as a process tree, selecting multiple processes and acting on them all at once.
To use htop we need to install it in our system.
sudo apt-get install htop
Now we can use the following command.
htop
Tracing memory usage in Linux
Memory is a critical resource in computing because its usage affects the performance and stability of a system. It’s necessary to trace the memory usage of the system in order to determine the program that consumes all CPU resources or the program that is responsible for slowing down the activities of the CPU.
Tracing memory usage also becomes necessary to determine the load on the server. Parsing the usage data enables the servers to be able to balance the load and serve the user’s request without slowing down the system. In Linux, there are several ways to trace memory usage, and we are going to discuss them.