Skip to content
Related Articles

Related Articles

Linux – Hegemon Modular System Monitoring Tool
  • Difficulty Level : Medium
  • Last Updated : 07 Mar, 2021

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:

  • Monitoring CPU, Memory and Swap Usage
  • Monitoring System Temperature and Fan Speed
  • Adjustable Update Interval
  • Unit Tests
  • Expand the data stream for detailed graphic representation
  • Clean MVC Architecture

Planned features for Hegemon include:

  • Support of macOS and BSD
  • Select and reorder Data Streams
  • Mouse Control
  • Monitoring Disk and Network I/O, GPU Usage and many more.

Hegemon a Modular System Monitoring Tool for Linux

 

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

Hegemon a Modular System Monitoring Tool for Linux

CentOS/RHEL:

$ yum install 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
Hegemon a Modular System Monitoring Tool for Linux

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 
Hegemon a Modular System Monitoring Tool for Linux

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

Hegemon a Modular System Monitoring Tool for Linux

Git clone method for Hegemon

Hegemon a Modular System Monitoring Tool for Linux

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,

  • CPU – Displays CPU Utilization
  • Core Num – Utilization of CPU Core based on number of available CPUs
  • Mem – Memory Utilization
  • Swap – Swap memory usage

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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :