Glances is a cross-platform system monitoring tool written in Python. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage.
It’ll run on almost any platform, including Linux, Windows, and macOS. This tool makes it easier for developers to view a large amount of monitoring information through a web-based interface.
Many of you know Top as a monitor tool, or Htop, a slightly more extensive version of Top. Both are great to use.
I think the big advantage of Glances is that you can install it on your server and see what is happening on your server from a distance. You can see with your browser what is going on on your network.
Or of course, you can monitor an entire network or a single local IP address.
You can even use Glances on your mobile (You need a rooted device and the Termux application (available on the Google Play Store).
Installation of Glances
There are several methods to test or install Glances on your system. Choose your weapon!
Glances Auto Install script: The total way
To install both dependencies and the latest Glances production-ready version (aka master branch), just enter the following command line:
curl -L https://bit.ly/glances | /bin/bash
wget -O- https://bit.ly/glances | /bin/bash
Pip: The simple way
Glances is on PyPI. By using Pip, you will be using the latest stable version.
To install, simply use pip:
pip install glances
You can also install the following libraries in order to use optional features (like the Web interface, exports modules…):
pip install 'glances[action,browser,cloud,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]'
To upgrade Glances to the latest version:
pip install --upgrade glances
In the video, I use the following to install Glances
For Debian - Ubuntu based (including Kali Linux and Parrot Security)
sudo apt install glances
For Arch based systems
sudo pacman -S glances
How to Use glances
A brief overview
For a comprehensive overview use the
glances --help page or the
man glances page.
[bullseye@anarchy:~]$ glances --help usage: glances [-h] [-V] [-d] [-C CONF_FILE] [--modules-list] [--disable-plugin DISABLE_PLUGIN] [--enable-plugin ENABLE_PLUGIN] [--disable-process] [--disable-webui] [--light] [-0] [-1] [-2] [-3] [-4] [-5] [-6] [--disable-history] [--disable-bold] [--disable-bg] [--enable-irq] [--enable-process-extended] [--export EXPORT] [--export-csv-file EXPORT_CSV_FILE] [--export-csv-overwrite] [--export-json-file EXPORT_JSON_FILE] [--export-graph-path EXPORT_GRAPH_PATH] [-c CLIENT] [-s] [--browser] [--disable-autodiscover] [-p PORT] [-B BIND_ADDRESS] [--username] [--password] [-u USERNAME_USED] [--snmp-community SNMP_COMMUNITY] [--snmp-port SNMP_PORT] [--snmp-version SNMP_VERSION] [--snmp-user SNMP_USER] [--snmp-auth SNMP_AUTH] [--snmp-force] [-t TIME] [-w] [--cached-time CACHED_TIME] [--open-web-browser] [-q] [-f PROCESS_FILTER] [--process-short-name] [--stdout STDOUT] [--stdout-csv STDOUT_CSV] [--hide-kernel-threads] [-b] [--diskio-show-ramfs] [--diskio-iops] [--fahrenheit] [--fs-free-space] [--sparkline] [--theme-white] [--disable-check-update] optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit -d, --debug enable debug mode -C CONF_FILE, --config CONF_FILE path to the configuration file --modules-list, --module-list display modules (plugins & exports) list and exit
For the standalone mode, just run
For the Web server mode, use
glances -w And enter the URL http://:61208 in your favorite web browser.
For the client/server mode, run
On the server side and run
glances -c <ip> on the client one.
glances -c <ip>
You can also detect and display all Glances servers available on your network or defined in the configuration file:
##Gateway to other services
Glances can export stats to: CSV file, JSON file, InfluxDB, Cassandra, CouchDB, OpenTSDB, Prometheus, StatsD, ElasticSearch, RabbitMQ/ActiveMQ, ZeroMQ, Kafka, Riemann and RESTful server.
While running the tool you can use the
h for help
In the video I show in detail how to install and use Glances. Otherwise this story will be very boring 😃
While tools such as Top or Htop offer the option to close programs with
kill, Glances is (not yet possible). Hopefully, that might happen.
It is very convenient that you can monitor this tool from anywhere on your device, be it on Linux, macOS, or Windows.
A great tool ..!
Did you know that on HackingPassiom.com you can read a whole lot more (“Hacking-related”)
I would like to thank Justin and Muqtadir for there donation !
2020-09-01 17:49 +0200