System Monitoring with Glances
Watchdog
![© Lead Image © Dmitriy Pchelintsev, 123RF.com © Lead Image © Dmitriy Pchelintsev, 123RF.com](/var/linux_magazin/storage/images/issues/2020/235/glances/po-23610-123rf-dmitriy_pchelintsev_123rf-aggressiver_hund_resized.png/768266-1-eng-US/PO-23610-123RF-Dmitriy_Pchelintsev_123RF-Aggressiver_Hund_resized.png_medium.png)
© Lead Image © Dmitriy Pchelintsev, 123RF.com
Admins and power users like to watch the load on their computers. Glances lets you see immediately if something is wrong.
Linux has no lack of monitoring tools. Because Linux is used so frequently in a server context, monitoring applications have always been important.
For the Linux desktop, you will find many smaller applications that focus on specific areas of monitoring. Glances [1] is a program that keeps you up to date with the current health state of your system.
Glances is available from the software repositories of most popular distributions and derivatives. For Debian, Ubuntu, or Linux Mint, use
sudo apt install glances
to install Glances. The project site [2] lists other ways to obtain Glances, which was written in Python, including Python's own package manager pip, a Glances Docker container, and the option to compile the application from source code.
Modes
Glances supports several operating modes for which you call the ncurses application with different parameters. In the simplest case, simply type the glances
command at the prompt. The tool then reads the values from hardware and software, displays them in the terminal ,and continuously updates the process list (Figure 1).
![](/var/linux_magazin/storage/images/issues/2020/235/glances/figure-1/768269-1-eng-US/Figure-1_large.png)
In order to keep an eye on the server on the home network from anywhere on the LAN, call up Glances on this LAN with the glances -w
command. The -w
parameter activates browser mode, which does not require its own web server, but is based on the Bottle web framework.
You can now access the program on http://<Server-IP>:61208 in the web browser from any other workstation on the web (Figure 2) and locally via a URL of http://localhost:61208. If you want to monitor the server via SSH from a workstation on the LAN, access the software via the terminal without browser mode.
![](/var/linux_magazin/storage/images/issues/2020/235/glances/figure-2/768272-1-eng-US/Figure-2_large.png)
In addition, Glances provides a client-server mode, which also allows the server to be called from any workstation on the network. To do this, launch the software on the server with the glances -s
command and on the client by entering:
glances -c <Server-IP>
By default, Glances listens on port 61209 in server mode. If required, you can also define another port with the -p
parameter.
To prevent unauthorized persons from accessing the Glances server and thus gaining an overview of the available hardware capacities, there is also the option of setting a password on the server with the --password
parameter, which the server then prompts you for when you access its IP.
Displays
Glances provides far more information than the usual system monitoring programs. In the upper part of the display, you will find information about the distribution, the kernel used, and the IP address of the system. Below this, you can see information about the CPU, the RAM, and the swap partition, as well as their current load values, listed in a table with several columns.
On the far right, you will also see information about the CPU kernel load and the operating time of the computer. Below that Glances provides periodically updated information about the network interfaces available on the system, the mass storage partitions, the occupancy of the system partition, and the installed sensors.
Shortcuts
Glances supplements these data with corresponding throughput rates, as well as with temperature values for sensors. To the right of this is a process display, which not only lists the individual processes one below the other, but also the CPU and memory usage per process in a separate column to the left. The individual displays are shown graphically, much like the load displays of htop
or top
.
Glances offers various possibilities to customize the appearance. For example, you can switch certain load displays on or off at the touch of a button. For example, pressing N removes the network interface information from the Glances window, while at the same time moving up the mass storage and I/O data. The developers provide detailed documentation on the keys that can be used interactively in the program [3].
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.
-
SUSE Offers CentOS 7 Support with Liberty Linux Lite
SUSE's Liberty Linux support offering now includes CentOS 7, which means businesses won't be forced to migrate those servers for some time.
-
Ubuntu's App Center Finally Supports Local Installs Again
If you regularly download .deb files and would prefer a GUI method of installing, Ubuntu has your back.
-
AlmaLinux Now Supports Raspberry Pi 5
If you're looking to create with the Raspberry Pi 5 and want to use AlmaLinux as your OS, you're in luck because it's now possible.
-
Kubuntu Focus Releases New Iterations of Ir14 and Ir16 Laptops
If you're a fan of the Kubuntu Focus laptops or have been waiting for the right time to purchase one, that time might be now.
-
NixOS 24.05 Is Ready for Prime Time
The latest release of NixOS (Uakari) has arrived and offers its usual reproducible, declarative, and reliable goodness.
-
Linux Lite 7.0 Officially Released
Based on Ubuntu 24.04 and kernel 6.8, Linux Lite version 7 now offers more options than ever.
-
KaOS Linux 2024.05 Adds Bcachfs Support and More
With updates all around, KaOS Linux now includes support for the bcachefs file system.
-
TUXEDO Computers Unveils New Iteration of the Stellaris Laptop Line
The Stellaris Slim 15 is the 6th generation and includes either an AMD or Intel CPU