Glances: install and use system monitoring on Debian servers
Glances puts processor, memory, disks, network and processes of a Linux system into a single terminal view. This article covers installing it on Debian 12 and 13 via apt, pipx and venv, the keys that drive the interface, web and server mode on ports 61208 and 61209, and the errors that come up most often.
One terminal window, and the whole machine is on screen: processor, memory, disks, network and process list. That is what Glances does. It is a Python program and pulls its figures from the psutil library (glances(1) manual page). Version 4.5.6 was released on 1 August 2026 and needs Python 3.10 or newer (PyPI).
What follows covers installation on Debian, the keys you actually use, the web and server modes, and the errors that come up most often.
What is Glances?
A single screen replaces what would otherwise take several commands. Glances puts processor load, memory and swap, load average, disk throughput, filesystems, network interfaces, sensors and the process list side by side. It refreshes every three seconds; -t changes that interval (glances(1)).
The program is not tied to the machine it runs on. A server mode publishes the readings over the network, and a web mode serves them to a browser. Both are covered further down.
Nothing about it is Debian-specific either — Glances also runs on BSD, macOS and Windows. The commands here are written for Debian 12 and 13.
Plugins and data sources
Every figure on screen comes from a plugin. There are separate modules for processor, memory, network, filesystems, the process list, containers, GPU, sensors and RAID. Anything you do not need can be switched off: --disable-plugin takes a comma-separated list (glances(1)).
Which plugins exist at all depends on how you installed the program. The Debian package ships the basics; the rest arrive through the optional extras described in the installation section. A few remain off even then — the connections view, for one (documentation for the connections plugin).
What Glances is good for
The value is in the aggregation. If you would otherwise run top for processes, df for filesystems and ip -s link for the network, you get the same numbers here on one screen. For a quick look at a server over SSH that is usually enough.
No learning curve is involved. h brings up the key bindings. Which values appear, which thresholds apply and which colours mark them are all set in a configuration file.
There is a trade-off worth naming. Glances is written in Python, which makes it heavier than top or htop, both written in C. The documentation publishes no figures for its own consumption, so none are quoted here. On a small virtual machine it pays to raise the refresh interval with -t and to disable the plugins you do not read.
Comparison with other tools
Against top and htop the difference is scope. Both show a process list and a header with load and memory, and stop there: no filesystems, no sensors, no containers. Glances covers those, at the cost of a denser display that gets cramped on a narrow terminal.
What it is not built for is continuous monitoring with history and alerting. Other programs handle that:
- htop: interactive process viewer for Unix systems, colourful and easy to read.
- nmon: performance measurement that can record to file.
- atop: keeps long-term performance logs and can step back through them.
- Netdata: real-time dashboard in the browser.
- Prometheus with Grafana: time series, alerting and dashboards across many machines.
- Conky: lightweight readout on the desktop.
- Icinga: monitoring for networks, infrastructure and services, with notifications.
- Zabbix: monitoring whole server estates, including availability.
- collectd: a daemon that gathers metrics and hands them to other systems.
Installing Glances on Debian
Debian offers three routes: the package from the Debian archive, an install through pipx, or a virtual environment of your own with venv. Which one fits depends on how current the version has to be.
System requirements
Glances 4 requires Python 3.10 or newer; anything older stays on the 3.4 branch (PyPI). On Debian that is no obstacle — Debian 12 “bookworm” ships Python 3.11 and Debian 13 “trixie” ships Python 3.13. To see what is installed:
python3 --version
Should Python 3 be missing entirely, which is rare on a Debian server, apt will supply it:
sudo apt update
sudo apt install python3
Every step below also assumes the server can reach the Debian mirrors or PyPI.
Installing via APT
The shortest route is the Debian package, which pulls its own dependencies:
sudo apt update
sudo apt install glances
What arrives, though, is not the newest release but whatever that Debian version froze. Debian 12 “bookworm” carries Glances 3.3.1.1, Debian 13 “trixie” carries 4.3.1, and the upcoming Debian 14 “forky” carries 4.5.6 (Debian Sources). The project also points out that distribution packages enable only the basic plugins (project README). To check what actually landed:
glances --version
Web mode additionally needs the FastAPI library (glances(1)). Whether it came along shows on the first glances -w: if it did not, the program reports the module as not found.
Installing with pipx
For the current release, take it from PyPI. The obvious command sudo pip3 install glances fails on Debian 12 and 13 with error: externally-managed-environment. The reason is PEP 668: Debian marks its Python as externally managed so that pip cannot write into directories that belong to apt. Our article How to install pip for Python goes through this in detail.
The project recommends pipx instead (project README). It creates a separate environment per program and only links the launcher:
sudo apt install pipx
Then install Glances with all optional modules. The quotes matter, otherwise the shell expands the square brackets itself:
pipx install 'glances[all]'
pipx places the launcher in ~/.local/bin/glances. If that directory is not on your PATH, pipx ensurepath adds it. To manage the environment yourself, use venv:
python3 -m venv ~/.venv
source ~/.venv/bin/activate
pip install glances
Either route gives you the current PyPI release and leaves the system Python alone.
Dependencies and configuration
Some plugins need extra libraries. These are published as extras and go in square brackets. [all] installs the lot; individually there are web, containers, export, gpu, sensors, snmp and wifi, among others (project README). There is no extra called docker: Docker, Podman and LXC all hang off the containers plugin.
pipx install 'glances[containers]'
A short test after installing:
glances
If the display shows the values you expect, the install is complete.
Starting Glances as a service
To keep Glances running in the background and reachable over the network, set up a systemd unit:
sudo nano /etc/systemd/system/glances.service
The content below starts web mode. Check the path to the binary first with command -v glances: the Debian package puts it in /usr/bin/glances, pipx in /home/.
[Unit]
Description=Glances - A cross-platform system monitoring tool
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/glances -w
Restart=on-failure
[Install]
WantedBy=multi-user.target
Save the file, close the editor, enable the service:
sudo systemctl daemon-reload
sudo systemctl enable glances.service
sudo systemctl start glances.service
Web mode listens on TCP port 61208 (documentation, Quickstart). The interface is then reachable in a browser:
http://your-server-ip:61208
Frequent installation problems
Two errors dominate at install time.
error: externally-managed-environment means pip install ran outside a virtual environment. The pipx or venv route above avoids it.
A ModuleNotFoundError at startup points to a missing extra — FastAPI under -w, typically. Reinstall through the same extra you used originally.
One caveat about the unit above: without a User= line it runs as root, and web mode asks for no password unless told to. On a server exposed to the internet, port 61208 does not belong open.
Use of Glances
Run glances and the terminal fills up. Processor, memory, swap and load average sit along the top. Network interfaces, filesystems and sensors run down the left. The process list takes the main area. Colours mark thresholds: green is fine, red is not.
First steps with Glances
Single keys drive the interface. h shows every binding, q quits. Sorting the process list: c by processor, m by memory, t by cumulative CPU time, i by I/O rate, p by name (glances(1)).
Those keys only change the sort order — they do not switch between views. To hide a section, use the configuration file or --disable-plugin.
glances -w starts a web server instead of the terminal view. The interface then answers at http:// with the same readings in a browser.
Advanced functions
There is no configuration menu inside the interface. Changes go into glances.conf. On Linux, Glances looks for it in ~/.config/glances/, then /etc/glances/, then /usr/share/doc/glances/. A user file overrides the system-wide one, and command-line options override both (documentation, Configuration).
That file also holds the thresholds at which a value turns yellow or red, and the actions triggered when it does.
For several machines, Glances has a mode of its own. Server mode -s publishes the readings on TCP port 61209 and a client collects them there. This is a protocol in its own right, not the same thing as web mode on port 61208 (documentation, Quickstart). Nothing runs over SSH by itself; to secure the link, put it in an SSH tunnel.
Commands and options
The command-line options that matter (glances(1)):
-t SECONDS: refresh interval, default 3 seconds.-w: web server mode on port 61208, requires FastAPI.-s: server mode, for a Glances client to connect to.-c TARGET: client mode. Takes an IPv4 or IPv6 address, a hostname, orhostname:port.-p PORT: a different TCP port for client and server, default 61209.--export MODULE: enables an export module such ascsvorjson; several are comma-separated.--disable-plugin LIST: turns individual plugins off.
For the full list, man glances.
Examples for the use of Glances
Three situations where reaching for it pays off.
Monitoring the server utilization
When a service stalls or drops out, the first two lines usually hold the answer. Load average over one, five and fifteen minutes tells you whether the problem is starting now or has been there a while. Sort the process list with c and it names the culprit.
For memory, watch the swap line. A machine that swaps continuously is simply under-provisioned. No amount of tuning individual processes helps there — only more RAM, or fewer services.
Network monitoring
The network row shows throughput per interface in both directions. Read alongside the process list, it tells you whether a spike fits the service that is running. A further plugin counts TCP connections by state, though it is off by default (documentation for the connections plugin).
Which process owns which connection is a question Glances does not answer. That is the job of ss and lsof, covered in How to show used ports in Linux.
Monitoring several servers remotely
For more than one machine there is a client and a server. Each monitored machine runs Glances in server mode:
glances -s
It listens on TCP port 61209, so the firewall has to let the monitoring station through. From there the client connects, and the target address is not optional:
glances -c 192.0.2.10
Without an address, client mode will not start. It accepts IPv4 and IPv6 addresses, hostnames and the hostname:port form; -p sets a different port on either side (glances(1)).
A word on securing it: server mode hands out complete system information. Port 61209 therefore does not belong open to the internet, but behind a firewall rule or inside an SSH tunnel. Blocking individual ports is covered in iptables REJECT vs DROP.
Use of alarm settings
Thresholds sit per plugin in glances.conf. Cross one and the display changes colour while the event lands in the event list. You can also attach a command to run when a threshold is crossed; that needs the action extra (project README).
Integration with other tools
--export passes the readings on rather than merely displaying them. The modules range from csv and json written to file through to time-series databases. That is the connection point for keeping history, because the terminal view retains none.
Use in cloud environments
On a virtual machine everything above still applies, with one caveat: the figures describe the guest, not the host. A high load average with no process using the processor usually means the cause lies outside — the neighbours on the same host. The only hint on screen is the steal figure in the processor row.
AWS, Google Cloud or Azure makes no difference here. Glances measures what the guest system reports.
Troubleshooting and common problems
Four symptoms cover most of what goes wrong.
Glances starts but shows no processes belonging to other users. Without root, the program only sees what your own account is entitled to. sudo glances lifts that. For load and filesystems alone it is unnecessary.
Web mode is unreachable. Check whether the process is listening at all, then the firewall. Port 61208 has to be open to the machines connecting. Debian does not install ufw by default; if you use iptables or nftables, iptables restore: restore rules from file after reboot has the details.
An error names a missing Python module. Then an extra is missing, not a Debian package. sudo apt install -f will not help: --fix-broken repairs interrupted dpkg installs and knows nothing about PyPI extras. Reinstall with the right extra instead, for example pipx install 'glances[all]'.
Something behaves inexplicably. Then read the log. Glances creates no fixed directory such as /var/log/glances/; where the file lives depends on the operating system. glances -V prints the full path, and the file rotates at 1 MB (glances(1)).
Conclusion
For the daily look at a server, Glances replaces a handful of separate commands. On Debian you install it either from the distribution — pinned to that release — or with pipx from PyPI if it has to be current. Calling pip install as root has failed since Debian 12, and PEP 668 is why.
History, mail alerts and dashboards spanning many machines are outside its remit. That is where Prometheus, Zabbix and Netdata begin. Within its own scope — one terminal, a fast overview — Glances does the job.
Further reading: the project on GitHub, the official documentation, the Debian manual page glances(1) and the German-language ubuntuusers wiki.