In today’s environment, where efficient utilization of server resources is crucial for management and optimization of infrastructure, real-time monitoring tools have become indispensable for every system administrator. CentOS 7, being one of the favorite Linux distributions for server deployment, offers a wide range of tools for monitoring system resources. Among the most popular are htop, nmon, and glances. This article will guide you on how to install and use these tools for effective server monitoring and management.
htop
Installation:
htop is an advanced interactive process viewer, replacing the classic top
tool. It provides a richer user interface with color support and better readability. To install htop on CentOS 7, use the command:
sudo yum install htop
Usage:
After installation, simply run htop
in your terminal. You will see a list of running processes along with information on CPU, memory, swap usage, and more. htop allows you to sort processes by various criteria and offers options for process management, such as killing or renicing processes.
nmon
Installation:
nmon (Nigel's Monitor) is another performance monitoring tool that provides detailed views on CPU, memory, disk, network interfaces, and more. To install nmon on CentOS 7, use:
sudo yum install nmon
Usage:
By running the nmon
command, you activate the monitoring mode. You can switch between various resource usage views by pressing the corresponding keys. For example, c
for CPU, m
for memory, and d
for disks. nmon also allows exporting collected data to a file for later analysis.
Glances
Installation:
Glances is another system monitoring tool that provides a comprehensive overview of various key metrics in real time. For its installation, you can use pip, the Python package manager:
sudo yum install python-pip
sudo pip install glances
After installation, launch glances by simply typing glances
into your terminal. This tool automatically updates the displayed information and offers a comprehensive view of CPU, memory, disk, network, and process utilization. Glances also allows for monitoring alerts for critical resource values and supports plugins for extended functionalities.
Each of these tools has its specific advantages, and their use depends on the particular needs of the system administrator. Whether you need detailed performance analysis or a quick overview of system states, htop, nmon, and glances provide the necessary information for efficient management and optimization of your server.