LinuxCommandLibrary

glances

Monitor system resources in real-time

TLDR

Run in terminal

$ glances
copy

Run in web server mode to show results in browser
$ glances [[-w|--webserver]]
copy

Run in server mode to allow connections from other Glances clients
$ glances [[-s|--server]]
copy

Connect to a Glances server
$ glances [[-c|--client]] [hostname]
copy

Require a password in (web) server mode
$ glances [[-s|--server]] --password
copy

Exit Glances
$ <q>
copy

Display help
$ glances [[-h|--help]]
copy

SYNOPSIS

glances [options]

PARAMETERS

-h, --help
    Show help message and exit

-V, --version
    Show version and exit

-v, --verbose
    Verbose mode

-C CORE, --config CORE
    Configuration file path

-f FILE, --logfile FILE
    Log to a file

-w, --web
    Launch web server on default port (61208)

-W, --web-browser
    Launch browser with web interface

-s, --server
    Run as server (default port 61209)

-c HOST, --client HOST
    Connect to a Glances server

-p PORT, --port PORT
    Server port

-B BIND, --bind BIND
    Bind address

-t SEC, --time SEC
    Refresh interval in seconds

-q, --quit
    Quit after fixed time (enable with -t)

--disable-module MODULE
    Disable a module (e.g., docker)

--enable-module MODULE
    Enable a module

--export {influxdb,prometheus,...}
    Export metrics to backend

-n, --disable-check-update
    Disable PyPI update check

--new-colors
    Use new color scheme

--tree
    Tree view of processes

--debug
    Debug mode

DESCRIPTION

Glances is a free, open-source, cross-platform command-line tool written in Python that provides a curses-based interface for real-time system monitoring. It displays key metrics including CPU, memory, load, disk I/O, network activity, file systems, sensors, processes, and Docker containers in a single, compact, color-coded screen.

Unlike traditional tools like top or htop, Glances offers more information at a glance, with ITARGZ layout (Information Top Adapted to Resources Glances), smart automatic sizing, and filtering. It supports standalone mode, client-server mode over SSH/XML-RPC, and web server mode for browser access. Data can be exported to CSV, InfluxDB, Prometheus, Grafana, StatsD, and more.

Key features include process sorting, resource limits with alerts (green/orange/red colors), per-core CPU stats, and extensibility via plugins. It's lightweight, portable (no installation needed if Python is present), and works on Linux, FreeBSD, macOS, and Windows. Ideal for servers, desktops, and troubleshooting.

CAVEATS

Requires Python 3. Glances auto-detects optional dependencies (e.g., psutil for full features); missing ones limit modules like GPU or Docker stats.
High refresh rates may increase CPU usage. Web/server modes expose metrics; secure with firewall.

CONFIGURATION

Uses ~/.config/glances/glances.conf for customization: colors, hiding modules, process filters, and thresholds.

KEY BINDINGS

Interactive: 1 toggle CPU per-core; m sort by MEM; f global filters; a sort processes; q quit; ? help.

HISTORY

Created by Nicolas Hennion (aka 'nicolargo') in 2009 as a top/htop alternative. Rewritten in Python around 2012 for portability. Version 3.x (2019+) added web export, Prometheus support, and modules system. Actively maintained on GitHub with 20k+ stars.

SEE ALSO

top(1), htop(1), nmon(1), atop(1), iotop(1), btop(1)

Copied to clipboard