glances1
An eye on your system
Usage
glances [OPTIONS]
A first
section
(called
global)
is
available:
than a
second
one
concerning
the
user
interface:
an InfluxDB
export
module:
or a
Nginx
AMP:
Or if
you
want
to
add
the
Operating
System
name
as
a
tag:
Overview
glances is a cross-platform curses-based monitoring tool that aims to present a maximum of information in a minimum of space, ideally fitting in a classic 80x24 terminal or larger for more details. It can adapt dynamically to the displayed information depending on the terminal size. It can also work in client/server mode. Remote monitoring can be performed via a terminal or web interface.
glances is written in Python and uses the psutil library to get information from your system.
Options
Options
-
-h, --help -
show this help message and exit
-
-V, --version -
show the program’s version number and exit
-
-d, --debug -
enable debug mode
-
--print-completion -
generate shell tab completion scripts for Glances CLI
-
-C CONF_FILE, --config CONF_FILE -
path to the configuration file
-
-P PLUGIN_DIRECTORY, --plugins PLUGIN_DIRECTORY -
path to a directory containing additional plugins
-
--modules-list -
display modules (plugins & exports) list and exit
-
--disable-plugin PLUGIN -
disable PLUGIN (comma-separated list)
-
--enable-plugin PLUGIN -
enable PLUGIN (comma-separated list)
-
--stdout PLUGINS_STATS -
display stats to stdout (comma-separated list of plugins/plugins.attribute)
-
--export EXPORT -
enable EXPORT module (comma-separated list)
-
--export-csv-file EXPORT_CSV_FILE -
file path for CSV exporter
-
--export-json-file EXPORT_JSON_FILE -
file path for JSON exporter
-
--disable-process -
disable process module (reduce Glances CPU consumption)
-
--disable-webui -
disable the Web UI (only the RESTful API will respond)
-
--light, --enable-light -
light mode for Curses UI (disable all but the top menu)
-
-0, --disable-irix -
task’s CPU usage will be divided by the total number of CPUs
-
-1, --percpu -
start Glances in per CPU mode
-
-2, --disable-left-sidebar -
disable network, disk I/O, FS and sensors modules
-
-3, --disable-quicklook -
disable quick look module
-
-4, --full-quicklook -
disable all but quick look and load
-
-5, --disable-top -
disable top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
-
-6, --meangpu -
start Glances in mean GPU mode
-
--disable-bold -
disable bold mode in the terminal
-
--disable-bg -
disable background colors in the terminal
-
--enable-process-extended -
enable extended stats on top process
-
-c CLIENT, --client CLIENT -
connect to a Glances server by IPv4/IPv6 address, hostname or hostname:port
-
-s, --server -
run Glances in server mode
-
--browser -
start TUI Central Glances Browser use –browser -w to start WebUI Central Glances Browser
-
--disable-autodiscover -
disable autodiscover feature
-
-p PORT, --port PORT -
define the client/server TCP port [default: 61209]
-
-B BIND_ADDRESS, --bind BIND_ADDRESS -
bind server to the given IPv4/IPv6 address or hostname
-
--username -
define a client/server username
-
--password -
define a client/server password
-
--snmp-community SNMP_COMMUNITY -
SNMP community
-
--snmp-port SNMP_PORT -
SNMP port
-
--snmp-version SNMP_VERSION -
SNMP version (1, 2c or 3)
-
--snmp-user SNMP_USER -
SNMP username (only for SNMPv3)
-
--snmp-auth SNMP_AUTH -
SNMP authentication key (only for SNMPv3)
-
--snmp-force -
force SNMP mode
-
-t TIME, --time TIME -
set refresh time in seconds [default: 3 sec]
-
-w, --webserver -
run Glances in web server mode (FastAPI lib needed)
-
--enable-mcp -
enable the MCP (Model Context Protocol) server alongside the web server (
mcppackage needed, see MCP (Model Context Protocol) server <#api-mcp>)
-
--mcp-path MCP_PATH -
set the MCP server mount path [default: /mcp]
-
--cached-time CACHED_TIME -
set the server cache time [default: 1 sec]
-
--open-web-browser -
try to open the Web UI in the default Web browser
-
-q, --quiet -
do not display the curses interface
-
-f PROCESS_FILTER, --process-filter PROCESS_FILTER -
set the process filter pattern (regular expression)
-
--process-short-name -
force short name for processes name
-
--hide-kernel-threads -
hide kernel threads in the process list (not available on Windows)
-
-b, --byte -
display network rate in bytes per second
-
--diskio-show-ramfs -
show RAM FS in the DiskIO plugin
-
--diskio-iops -
show I/O per second in the DiskIO plugin
-
--fahrenheit -
display temperature in Fahrenheit (default is Celsius)
-
--fs-free-space -
display FS free space instead of used
-
--theme-white -
optimize display colors for a white background
-
--disable-check-update -
disable online Glances version check
Interactive commands
The following commands (key pressed) are supported while in Glances:
- ENTER
-
Set the process filter
Note:On macOS please use CTRL-H to delete filter.
The filter is a regular expression pattern:
- •
-
gnome: matches all processes starting with thegnomestring
- •
-
.*gnome.*: matches all processes containing thegnomestring
a-
Sort process list automatically
- •
-
If CPU
>70%, sort processes by CPU usage
- •
-
If MEM
>70%, sort processes by MEM usage
- •
-
If CPU iowait
>60%, sort processes by I/O read and write
- A
-
Enable/disable the Application Monitoring Process
b-
Switch between bit/s or Byte/s for network I/O
- B
-
View disk I/O counters per second
c-
Sort processes by CPU usage
- C
-
Enable/disable cloud stats
d-
Show/hide disk I/O stats
- D
-
Enable/disable Docker stats
e-
Enable/disable top extended stats
- E
-
Erase the current process filter
f-
Show/hide file system and folder monitoring stats
- F
-
Switch between file system used and free space
g-
Generate graphs for current history
- G
-
Enable/disable GPU stats
h-
Show/hide the help screen
i-
Sort processes by I/O rate
- I
-
Show/hide IP module
- +
-
Increase selected process nice level / Lower the priority (need right) - Only in standalone mode.
--
Decrease selected process nice level / Higher the priority (need right) - Only in standalone mode.
k-
Kill selected process (need right) - Only in standalone mode.
- K
-
Show/hide TCP connections
l-
Show/hide log messages
m-
Sort processes by MEM usage
- M
-
Reset processes summary min/max
n-
Show/hide network stats
- N
-
Show/hide current time
p-
Sort processes by name
- P
-
Enable/Disable ports stats
q|ESC|CTRL-C-
Quit the current Glances session
- Q
-
Show/hide IRQ module
r-
Reset history
- R
-
Show/hide RAID plugin
s-
Show/hide sensors plugin
- S
-
Enable/disable spark lines
t-
Sort process by CPU times (TIME+)
- T
-
View network I/O as a combination
u-
Sort processes by USER
- U
-
View cumulative network I/O
- V
-
Show/hide VMS plugin
w-
Delete finished warning log messages
- W
-
Show/hide Wifi module
x-
Delete finished warning and critical log messages
z-
Show/hide processes stats
0-
Enable/disable Irix/Solaris mode
The task’s CPU usage will be divided by the total number of CPUs
1-
Switch between global CPU and per-CPU stats
2-
Enable/disable the left sidebar
3-
Enable/disable the quick look module
4-
Enable/disable all but quick look and load module
5-
Enable/disable the top menu (QuickLook, CPU, MEM, SWAP, and LOAD)
6-
Enable/disable mean GPU mode
9-
Switch UI theme between black and white
/-
Switch between process command line or command name
- F5 or CTRL-R
-
Refresh user interface
- SHIFT-LEFT
-
Navigation left through the process sort
- SHIFT-RIGHT
-
Navigation right through the process sort
- LEFT
-
Navigation left through the process name
- RIGHT
-
Navigation right through the process name
- UP
-
Up in the processes list
- DOWN
-
Down in the processes list
In the Glances client browser (accessible through the --browser command line argument):
ENTER
|
Run the selected server |
|---|---|
UP
|
Up in the servers list |
DOWN
|
Down in the servers list |
|
Quit Glances |
Configuration
No configuration file is mandatory to use Glances.
Furthermore, a configuration file is needed to access more settings.
Location
Note:
A template is available in the /usr{,/local}/share/doc/glances (Unix-like) directory or directly on GitHub <https://raw.githubusercontent.com/nicolargo/glances/master/conf/glances.conf>.
You can place your glances.conf file in the following locations:
| Linux, SunOS | ~/.config/glances/, /etc/glances/, /usr/share/doc/glances/ |
| *BSD | ~/.config/glances/, /usr/local/etc/glances/, /usr/share/doc/glances/ |
| macOS | ~/.config/glances/, ~/Library/Application Support/glances/, /usr/local/etc/glances/, /usr/share/doc/glances/ |
| Windows | %APPDATA%\glances\glances.conf |
| All | <venv_root_folder>/share/doc/glances/ |
- •
-
On Windows XP, %APPDATA% is: C:\Documents and Settings\<USERNAME>\Application Data.
- •
-
On Windows Vista and later:
C:\Users\<USERNAME>\AppData\Roaming.
User-specific options override system-wide options, and options given on the command line overrides both.
Logging
Glances logs all of its internal messages to a log file.
DEBUG messages can be logged using the -d option on the command line.
The location of the Glances log file depends on your operating system. You can display the full path of the Glances log file using the glances -V command line.
The file is automatically rotated when its size exceeds 1 MB.
If you want to use another system path or change the log message, you can use your logger configuration. First of all, you have to create a glances.json file with, for example, the following content (JSON format):
{
"version": 1,
"disable_existing_loggers": "False",
"root": {
"level": "INFO",
"handlers": ["file", "console"]
},
"formatters": {
"standard": {
"format": "%(asctime)s -- %(levelname)s -- %(message)s"
},
"short": {
"format": "%(levelname)s: %(message)s"
},
"free": {
"format": "%(message)s"
}
},
"handlers": {
"file": {
"level": "DEBUG",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "standard",
"filename": "/var/tmp/glances.log"
},
"console": {
"level": "CRITICAL",
"class": "logging.StreamHandler",
"formatter": "free"
}
},
"loggers": {
"debug": {
"handlers": ["file", "console"],
"level": "DEBUG"
},
"verbose": {
"handlers": ["file", "console"],
"level": "INFO"
},
"standard": {
"handlers": ["file"],
"level": "INFO"
},
"requests": {
"handlers": ["file", "console"],
"level": "ERROR"
},
"elasticsearch": {
"handlers": ["file", "console"],
"level": "ERROR"
},
"elasticsearch.trace": {
"handlers": ["file", "console"],
"level": "ERROR"
}
}
}
and start Glances using the following command line:
LOG_CFG=<path>/glances.json glances
Note:
Replace <path> with the directory where your glances.json file is hosted.
Examples
Monitor local machine, also called standalone mode, with the Text-based user interface (TUI):
$ glances
To monitor the local machine with the Web user interface (WebUI), , run the following command line:
$ glances -w
then, open a Web Browser to the provided URL.
Monitor local machine and export stats to a CSV file:
$ glances –export csv –export-csv-file /tmp/glances.csv
Monitor local machine and export stats to an InfluxDB server with 5s refresh time (also possible to export to OpenTSDB, Cassandra, Statsd, ElasticSearch, RabbitMQ, and Riemann):
$ glances -t 5 –export influxdb
It is also possible to export stats to multiple endpoints:
$ glances -t 5 –export influxdb,statsd,csv
Start a Glances server (server mode):
$ glances -s
Connect Glances to a Glances server (client mode):
$ glances -c <ip_server>
Connect to a Glances server and export stats to a StatsD server:
$ glances -c <ip_server> –export statsd
Start the TUI Central Glances Browser:
$ glances –browser
Start the WebUI Central Glances Browser (new in Glances 4.3 or higher):
$ glances –browser -w
If you do not want to see the local Glances Web Server in the browser list please use –disable-autodiscover option.
Releases
6 releases since Debian 8 (Jessie); the text changed 5 times.
--browser since Debian 9 (Stretch);
--cached-time since Debian 10 (Buster);
--disable-autodiscover since Debian 9 (Stretch);
--disable-bg since Debian 9 (Stretch);
--disable-check-update since Debian 10 (Buster);
--disable-irix since Debian 9 (Stretch);
--disable-left-sidebar since Debian 9 (Stretch);
--disable-plugin since Debian 10 (Buster);
--disable-quicklook since Debian 9 (Stretch);
--disable-top since Debian 9 (Stretch);
--disable-webui since Debian 10 (Buster);
--diskio-iops since Debian 9 (Stretch);
--diskio-show-ramfs since Debian 9 (Stretch);
--enable-light since Debian 10 (Buster);
--enable-mcp since Arch Linux 2026-11-01;
--enable-plugin since Debian 12 (Bookworm);
--enable-process-extended since Debian 9 (Stretch);
--export since Debian 10 (Buster);
--export-csv-file since Debian 10 (Buster);
--export-json-file since Debian 10 (Buster);
--fahrenheit since Debian 9 (Stretch);
--fs-free-space since Debian 9 (Stretch);
--full-quicklook since Debian 9 (Stretch);
--hide-kernel-threads since Debian 9 (Stretch);
--light since Debian 10 (Buster);
--mcp-path since Arch Linux 2026-11-01;
--meangpu since Debian 10 (Buster);
--modules-list since Debian 12 (Bookworm);
--open-web-browser since Debian 12 (Bookworm);
--plugins since Debian 13 (Trixie);
--print-completion since Arch Linux 2026-11-01;
--process-filter since Debian 9 (Stretch);
--quiet since Debian 9 (Stretch);
--stdout since Debian 10 (Buster);
--username since Debian 9 (Stretch);
-0 since Debian 9 (Stretch);
-2 since Debian 9 (Stretch);
-3 since Debian 9 (Stretch);
-4 since Debian 9 (Stretch);
-5 since Debian 9 (Stretch);
-6 since Debian 10 (Buster);
-P since Debian 13 (Trixie);
-f since Debian 9 (Stretch);
-q since Debian 9 (Stretch).
--disable-amps until Debian 9 (Stretch);
--disable-cpu until Debian 9 (Stretch);
--disable-diskio until Debian 9 (Stretch);
--disable-docker until Debian 9 (Stretch);
--disable-folder until Debian 9 (Stretch);
--disable-fs until Debian 9 (Stretch);
--disable-hddtemp until Debian 9 (Stretch);
--disable-ip until Debian 9 (Stretch);
--disable-irq until Debian 9 (Stretch);
--disable-load until Debian 9 (Stretch);
--disable-log until Debian 9 (Stretch);
--disable-mem until Debian 9 (Stretch);
--disable-network until Debian 9 (Stretch);
--disable-ports until Debian 9 (Stretch);
--disable-process-extended until Debian 8 (Jessie);
--disable-raid until Debian 9 (Stretch);
--disable-sensors until Debian 9 (Stretch);
--disable-swap until Debian 9 (Stretch);
--enable-history until Debian 13 (Trixie);
--export-cassandra until Debian 9 (Stretch);
--export-csv until Debian 9 (Stretch);
--export-elasticsearch until Debian 9 (Stretch);
--export-influxdb until Debian 9 (Stretch);
--export-opentsdb until Debian 9 (Stretch);
--export-rabbitmq until Debian 9 (Stretch);
--export-riemann until Debian 9 (Stretch);
--export-statsd until Debian 9 (Stretch);
--output-csv until Debian 8 (Jessie);
--path-history until Debian 9 (Stretch);
--tree until Debian 9 (Stretch);
-modules-list until Debian 10 (Buster).