Glances. A nice new networking script for Linux that runs on Python.

Glances is a very detailed script that will print out comprehensive information about your Linux workstation or server. To install the Glances script clone the git repository this way.

[email protected]:~$ git clone https://github.com/nicolargo/glances.git
Cloning into 'glances'...
remote: Counting objects: 13758, done.
remote: Total 13758 (delta 0), reused 0 (delta 0), pack-reused 13758
Receiving objects: 100% (13758/13758), 20.00 MiB | 257.00 KiB/s, done.
Resolving deltas: 100% (9568/9568), done.
Checking connectivity... done.

On Ubuntu 16.04 I had to run this command to install a dependency.

[email protected]:~/glances$ sudo apt-get install python-setuptools

Then I installed it this way.

cd glances/
[email protected]:~/glances$ sudo ./setup.py install

After this is complete, just run the glances command and it will open as shown in the screenshot below.

Glances system information script running.
Glances system information script running.

The processes are color coded, they are green by default and turn red when CPU usage for example goes over a certain threshold. CPU, memory and swap information is shown, as you can see, there is very little swap usage, if any with 12 gigabytes of RAM.

The free space on mounted file-systems is also shown, and this is also color coded. It is obvious that a DVD movie has no free space :).

Networking information is available and this is useful for watching network throughput in real time.

Warnings and critical alerts will be shown if they crop up, but the only thing I saw was a process that spiked to 105% CPU usage and then went back down.

Running glances with the -t parameter will specify an update interval in seconds. The example below will update every 4 seconds.

[email protected]:~/Desktop$ glances -t 4

Apparently, with the -s parameter, you may run glances as a client-server application and connect to it remotely to monitor a remote machine, but I could not get that working myself. Connecting to a machine using a secure SSH connection and then running it would make a lot of sense.

After pressing d to hide the disk I/O section.

After pressing d to hide the disk IO section.
After pressing d to hide the disk IO section.

There are many interactive commands that may be used while the utility is running. All are listed in the documentation.

Full documentation here: http://glances.readthedocs.io/en/latest/.

This is one very useful script to monitor your Linux server’s performance. Get a copy today and enjoy a better way to see system information.

No comments have been made. Use this form to start the conversation :)

Leave a Reply