Open In App

Linux – Hegemon Modular System Monitoring Tool

Hegemon is a work-in-progress modular system monitor written in secure Rust programming language. This allows users to monitor utilization and hardware in a single dashboard. The system hardware and utilization information are collected through the use of variables like chan, termion, systemstat and sensor.  Some tools such as htop, CorFreq, glances, atop, Dstat, Gtop, Linux Dash, Netdata, Monit, etc. allows us to monitor system utilization but not hardware, these tools provide us with different information on system data like resource utilization, running processes, CPU Temperature etc. Hegemon provides all the information in a Single Dashboard that also monitors the system hardware. 

Hegemon has various features as mentioned below:



Planned features for Hegemon include:



 

Hegemon Installation in Linux:

Hegemon is available for Linux and requires Rust or later and other development files for libsensors, these packages are to be installed in the system before installing Hegemon. Rust is an open-source practical system programming language that runs fast and prevents segfaults and guarantees thread safety and Rust is developed by Mozilla. Rust is installed in a Linux system by executing the following commands, use installer-script which requires a curl command line to run this.

Debian/Ubuntu:

$ sudo apt-get install curl

CentOS/RHEL:

$ yum install curl

Fedora:

$ dnf install curl

Install Rust by running the command in the terminal, Rust is installed and managed by rustup tool.

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup/rs | sh

Setting up Rust Environment

After you’re done with installing Rust the Cargo’s bin directory 

~/.cargo/bin – In this directory, all the necessary tools are installed and are added to the PATH Environment variable in ~/.profile

During the installation of rustup attempts to add cargo’s bin directory to PATH in case this fails, we can set it up manually using rust. After this development files have to be installed which are found in the package repository of each distribution like lm_sensors_devel in Fedora and linsensors4-dev in Ubuntu/Debian. To install these files execute the following based on the distribution you’re working on,

Debian/Ubuntu:

$ apt install libsensors4-dev

Fedora:

$ dnf install lm_sensors-devel

CentOS/RHEL:

# yum install lm_sensors-devel

We have successfully installed libsensors4-dev now to verify the version of rust installed on the system by running the command,

$ rustc --version 

Installation of Development files libsensors4-dev

Now Rust and other development files have been installed we can proceed to install Hegemon using Rust’s package manager cargo. 

$ cargo install hegemon 

The necessary requirements to install hegemon have been done and if this command doesn’t execute, this may happen if the Linux version is not up-to-date and throws an error then you can use the other method to run hegemon which is described below.

Another Method to build Hegemon is by git clone method to do so execute the following command. A directory will be created for the hegemon tool where all the files are installed in it, then with the help of cd navigate to the hegemon directory to run hegemon. After this use cargo to run the hegemon tool.

$ git clone https://github.com/p-e-w/hegemon.git
$ cd hegemon
$ cargo run

Git clone method for Hegemon

When the installation is complete run hegemon using cargo run command, after which it displays an overall summary of the systems and in the form of visual diagrams using the CPU, RAM and swap space, Network Utilization, Data from the temperature sensors and the speed of rotation. CPU Usage is displayed for each engine a separate graph and graph of average load. This is updated at regular intervals in real-time, interval of updates is adjustable.

Hegemon allows any chart to disclose to view a more detailed graph and additional information. The status monitoring of hardware sensors (temperature sensors) is carried out using lm_sensors (hardware monitoring) which is used to control keyboard shortcuts. 

The above output displays the following sections,

You can expand each section by clicking on Space with this you can get detailed information about the utilization of resources that you want to check. To increase or decrease the update interval, you can use + and – keys. Using Hegemon you can see every aspect of the system with its current capacities and percentage of use.

Article Tags :