The System Administrator relies on monitoring tools to monitor and debug the system performance every day. A number of system monitoring tools are now available in Linux distributions. System admins always rely on the top command that comes as default with every Linux distributions. Although the tools come in a variety of options, nothing gives a better understanding of the system performance. The top command lacks highlighting options to sort the accounts, which are draining the CPU and memory. This blog gives an overview on Glances, a powerful system monitoring program.
‘Glances’ is a cross platform command line system monitoring tool written in Python language. The free tool licensed under GPL, utilises psutil library to fetch the statistical values of parameters from the server. ‘Glances’ is designed to provide maximum information at a single view, within the limited space. The command helps in monitoring the CPU, load average, network interfaces, I/O processes and space utilization in the file system. It works in client as well as server mode and provides remote monitoring feature, via terminal or web interface.
Glances can be installed on the Linux system RHEL/CentOS/Fedora, by executing the following command from the terminal:
# yum install -y glances
Another astonishing feature of ‘Glances’ lies in setting threshold values and interpreting information by using various colour codes. The threshold values careful, warning and critical can be defined in the configuration file. The default configuration file is located at ‘/etc/glances/glances.conf’. The information can be highlighted in Green, Blue, Violet and Red.
The colours indicate:
By default the threshold values are set as careful = 50, warning = 70 and critical = 90. However it can be customized as per our requirement.
Below listed are some of the hot keys to sort the output while Glances is running.
- a – Sort processes automatically
- c – Sort processes by CPU%
- m – Sort processes by MEM%
- p – Sort processes by name
- i – Sort processes by I/O rate
- d – Show/hide disk I/O stats ols
- f – Show/hide file system statshddtemp
- n – Show/hide network stats
- s – Show/hide sensors stats
- y – Show/hide hddtemp stats
- l – Show/hide logs
- b – Bytes or bits for network I/O tools
- w – Delete warning logs
- x – Delete warning and critical logs
- 1 – Global CPU or per-CPU stats
- h – Show/hide this help screen
- t – View network I/O as combination
- u – View cumulative network I/O
- q – Quit (Esc and Ctrl-C also work)
‘Glances’ is undoubtedly a user-friendly system monitoring tool, using which a system admin can get an overall idea of the system status.