Ever wanted to keep an eye on a Linux remote server system resources? Glances can do that for you, through a beautiful, clean and straightforward interface. Even more than that, it’s free!

Glances running on Fedora

Glances running on  Ubuntu

Installing Glances on Ubuntu and Fedora systems

For Ubuntu, open a terminal and type the following commands:
sudo apt-get install python-pip build-essential python-dev python-bottle
sudo pip install Glances
sudo pip install PySensors

For Fedora, open a terminal and type:
sudo yum install python-pip kernel-devel python-devel python-bottle
sudo pip install Glances
sudo pip install PySensors

Using Glances

To run Glances, just type in the console:
glances

You will now see a lot of information about the running processes and how many resources each one is using. You can also see the CPU, RAM and swap load, as well as the network traffic, I/O and filesystem usage. Each color in a value means something:
GREEN color means everything is OK,
BLUE means CAREFUL,
VIOLET means WARNING and
RED means, of course, CRITICAL.

There are also some keys you can use to fine tune how Glances presents the statistics:
c: Sort processes by CPU%
m: Sort processes by MEM%
p: Sort processes by name
i: Sort processes by IO Rate
d: Show/hide disk I/O stats
f: Show/hide file system stats
n: Show/hide network stats
s: Show/hide sensors stats
b: Bit/s or Byte/s for network IO
w: Delete warning logs
x: Delete warning and critical logs
1: Global CPU or Per Core stats
h: Show/hide this help message
q: Quit (Esc and Ctrl-C also work)
l: Show/hide log messages

Running Glance

There are three ways of using Glances:

Normal: Run this command in a terminal:
glances

As a client-server: From my point of view, this can be done much easier by logging into the remote server through SSH and just running glance. But anyway, on the system you want to monitor, open a terminal and type:
glances -s

This will run the Glances server on 0.0.0.0:61209.

You can specify other IP address and/or port by running:
glances -s -B 192.168.xx.xx -p 6161

Now, from another computer (make sure the IP address is reachable), type:
glances -c 192.168.xx.xx -p 6161

As a webserver: Run the following command in a terminal:
glances -w

This will start a webserver so open your favorite browser and point it to http://server.ip.address:61208 (replace server.ip.address with localhost if you’re not remote)

Glances webserver

Glances website

Glances: remotely monitor your system resources
Tagged on: