Linux Command Library
commands
Commands
basic
Basic
tips
Tips

glances

A cross-platform curses-based monitoring tool

- Run in terminal:
glances

- Run in web server mode to show results in browser:
glances -w

- Run in server mode to allow connections from other Glances clients:
glances -s

- Connect to a Glances server:
glances -c [hostname]

- Require a password in (web) server mode:
glances -s --password

glances [-bdehmnrsvyz1] [-B bind] [-c server] [-C conffile] [-f file] [-o output] [-p port] [-P password] [-t refresh]

Glances is a free (LGPL) cross-platform curses-based monitoring tool which aims to present a maximum of information in a minimum of space, ideally to fit in a classical 80x24 terminal or higher to have additionnal information.

Glances can adapt dynamically the displayed information depending on the terminal size. It can also work in a client/server mode for remote monitoring.

This tool is written in Python and uses the psutil library to fetch the statistical values from key elements, like CPU, load average, memory, network, disks, file systems, processes, etc.

The command-line options are the following:

-b

Display network rate in Byte per second (default: bit per second)

-B @IP|HOST

Bind server to the given IPv4/IPv6 address or hostname

-c @IP|HOST

Connect to a Glances server by IPv4/IPv6 address or hostname

-C FILE

Path to the configuration file

-d

Disable disk I/O module

-e

Enable sensors module (requires pysensors, Linux-only)

-f FILE

Set the HTML output folder or CSV file

-h

Display the help and exit

-m

Disable mount module

-n

Disable network module

-o OUTPUT

Define additional output (available: HTML or CSV)

-p PORT

Define the client/server TCP port (default: 61209)

-P PASSWORD

Define a client/server password

--password

Define a client/server password from the prompt

-r

Disable process list (for low CPU consumption)

-s

Run Glances in server mode

-t SECONDS

Set refresh time in seconds (default: 3 sec)

-v

Display the version and exit

-y

Enable hddtemp module (requires hddtemp)

-z

Do not use the bold color attribute

-1

Start Glances in per-CPU mode

You can use the following keys while in Glances:

a

Sort process list automatically

b

Switch between bit/s or Byte/s for network I/O

c

Sort processes by CPU usage

d

Show/hide disk I/O stats

f

Show/hide file system stats

h

Show/hide the help screen

i

Sort processes by I/O rate

l

Show/hide log messages

m

Sort processes by MEM usage

n

Show/hide network stats

p

Sort processes by name

q

Quit

s

Show/hide sensors stats (only available with -e flag)

t

View network I/O as combination

u

View cumulative network I/O

w

Delete finished warning log messages

x

Delete finished warning and critical log messages

y

Show/hide hddtemp stats (only available with -y flag)

1

Switch between global CPU and per-CPU stats

Refresh information every 5 seconds:

glances -t 5

Glances returns a zero exit status if it succeeds to print/grab information.

It returns 2 if it fails to parse its options (missing arguments, invalid value, etc).

Glances is written by Nicolas Hennion aka Nicolargo (contact@nicolargo.com)

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied