1GLANCES(1)                          Glances                         GLANCES(1)
2
3
4

NAME

6       glances - An eye on your system
7

SYNOPSIS

9       glances [OPTIONS]
10

DESCRIPTION

12       glances  is a cross-platform curses-based monitoring tool which aims to
13       present a maximum of information in a minimum of space, ideally to  fit
14       in a classical 80x24 terminal or higher to have additional information.
15       It can adapt dynamically the displayed  information  depending  on  the
16       terminal size. It can also work in client/server mode.  Remote monitor‐
17       ing could be done via terminal or web interface.
18
19       glances is written in Python and uses the psutil library to get  infor‐
20       mation from your system.
21

OPTIONS

COMMAND-LINE OPTIONS

24       -h, --help
25              show this help message and exit
26
27       -V, --version
28              show program’s version number and exit
29
30       -d, --debug
31              enable debug mode
32
33       -C CONF_FILE, --config CONF_FILE
34              path to the configuration file
35
36       --modules-list
37              display modules (plugins & exports) list and exit
38
39       --disable-plugin PLUGIN
40              disable PLUGIN (comma separated list)
41
42       --enable-plugin PLUGIN
43              enable PLUGIN (comma separated list)
44
45       --stdout PLUGINS_STATS
46              display  stats  to stdout (comma separated list of plugins/plug‐
47              ins.attribute)
48
49       --export EXPORT
50              enable EXPORT module (comma separated list)
51
52       --export-csv-file EXPORT_CSV_FILE
53              file path for CSV exporter
54
55       --export-json-file EXPORT_JSON_FILE
56              file path for JSON exporter
57
58       --disable-process
59              disable process module (reduce Glances CPU consumption)
60
61       --disable-webui
62              disable the Web UI (only the RESTful API will respond)
63
64       --light, --enable-light
65              light mode for Curses UI (disable all but top menu)
66
67       -0, --disable-irix
68              task’s CPU usage will be divided by the total number of CPUs
69
70       -1, --percpu
71              start Glances in per CPU mode
72
73       -2, --disable-left-sidebar
74              disable network, disk I/O, FS and sensors modules
75
76       -3, --disable-quicklook
77              disable quick look module
78
79       -4, --full-quicklook
80              disable all but quick look and load
81
82       -5, --disable-top
83              disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
84
85       -6, --meangpu
86              start Glances in mean GPU mode
87
88       --enable-history
89              enable the history mode
90
91       --disable-bold
92              disable bold mode in the terminal
93
94       --disable-bg
95              disable background colors in the terminal
96
97       --enable-process-extended
98              enable extended stats on top process
99
100       -c CLIENT, --client CLIENT
101              connect to a Glances server by IPv4/IPv6  address,  hostname  or
102              hostname:port
103
104       -s, --server
105              run Glances in server mode
106
107       --browser
108              start the client browser (list of servers)
109
110       --disable-autodiscover
111              disable autodiscover feature
112
113       -p PORT, --port PORT
114              define the client/server TCP port [default: 61209]
115
116       -B BIND_ADDRESS, --bind BIND_ADDRESS
117              bind server to the given IPv4/IPv6 address or hostname
118
119       --username
120              define a client/server username
121
122       --password
123              define a client/server password
124
125       --snmp-community SNMP_COMMUNITY
126              SNMP community
127
128       --snmp-port SNMP_PORT
129              SNMP port
130
131       --snmp-version SNMP_VERSION
132              SNMP version (1, 2c or 3)
133
134       --snmp-user SNMP_USER
135              SNMP username (only for SNMPv3)
136
137       --snmp-auth SNMP_AUTH
138              SNMP authentication key (only for SNMPv3)
139
140       --snmp-force
141              force SNMP mode
142
143       -t TIME, --time TIME
144              set refresh time in seconds [default: 3 sec]
145
146       -w, --webserver
147              run Glances in web server mode (bottle lib needed)
148
149       --cached-time CACHED_TIME
150              set the server cache time [default: 1 sec]
151
152       open-web-browser
153              try to open the Web UI in the default Web browser
154
155       -q, --quiet
156              do not display the curses interface
157
158       -f PROCESS_FILTER, --process-filter PROCESS_FILTER
159              set the process filter pattern (regular expression)
160
161       --process-short-name
162              force short name for processes name
163
164       --hide-kernel-threads
165              hide kernel threads in process list (not available on Windows)
166
167       -b, --byte
168              display network rate in byte per second
169
170       --diskio-show-ramfs
171              show RAM FS in the DiskIO plugin
172
173       --diskio-iops
174              show I/O per second in the DiskIO plugin
175
176       --fahrenheit
177              display temperature in Fahrenheit (default is Celsius)
178
179       --fs-free-space
180              display FS free space instead of used
181
182       --theme-white
183              optimize display colors for white background
184
185       --disable-check-update
186              disable online Glances version ckeck
187

INTERACTIVE COMMANDS

189       The following commands (key pressed) are supported while in Glances:
190
191       ENTER  Set the process filter
192
193              NOTE:
194                 On macOS please use CTRL-H to delete filter.
195
196              Filter is a regular expression pattern:
197
198gnome: matches all processes starting with the gnome string
199
200.*gnome.*: matches all processes containing the gnome string
201
202       a      Sort process list automatically
203
204              • If CPU >70%, sort processes by CPU usage
205
206              • If MEM >70%, sort processes by MEM usage
207
208              • If CPU iowait >60%, sort processes by I/O read and write
209
210       A      Enable/disable Application Monitoring Process
211
212       b      Switch between bit/s or Byte/s for network I/O
213
214       B      View disk I/O counters per second
215
216       c      Sort processes by CPU usage
217
218       C      Enable/disable cloud stats
219
220       d      Show/hide disk I/O stats
221
222       D      Enable/disable Docker stats
223
224       e      Enable/disable top extended stats
225
226       E      Erase current process filter
227
228       f      Show/hide file system and folder monitoring stats
229
230       F      Switch between file system used and free space
231
232       g      Generate graphs for current history
233
234       G      Enable/disable GPU stats
235
236       h      Show/hide the help screen
237
238       i      Sort processes by I/O rate
239
240       I      Show/hide IP module
241
242       k      Kill selected process
243
244       K      Show/hide TCP connections
245
246       l      Show/hide log messages
247
248       m      Sort processes by MEM usage
249
250       M      Reset processes summary min/max
251
252       n      Show/hide network stats
253
254       N      Show/hide current time
255
256       p      Sort processes by name
257
258       P      Enable/Disable ports stats
259
260       q|ESC|CTRL-C
261              Quit the current Glances session
262
263       Q      Show/hide IRQ module
264
265       r      Reset history
266
267       R      Show/hide RAID plugin
268
269       s      Show/hide sensors stats
270
271       S      Enable/disable spark lines
272
273       t      Sort process by CPU times (TIME+)
274
275       T      View network I/O as combination
276
277       u      Sort processes by USER
278
279       U      View cumulative network I/O
280
281       w      Delete finished warning log messages
282
283       W      Show/hide Wifi module
284
285       x      Delete finished warning and critical log messages
286
287       z      Show/hide processes stats
288
289       0      Enable/disable Irix/Solaris mode
290
291              Task’s CPU usage will be divided by the total number of CPUs
292
293       1      Switch between global CPU and per-CPU stats
294
295       2      Enable/disable left sidebar
296
297       3      Enable/disable the quick look module
298
299       4      Enable/disable all but quick look and load module
300
301       5      Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
302
303       6      Enable/disable mean GPU mode
304
305       9      Switch UI theme between black and white
306
307       /      Switch between process command line or command name
308
309       F5     Refresh stats in curses user interface
310
311       LEFT   Navigation leff through process sort
312
313       RIGHT  Navigation right through process sort
314
315       UP     Up in the processes list
316
317       DOWN   Down in the processes list
318
319       In the Glances client browser (accessible through the --browser command
320       line argument):
321
322       ENTER  Run the selected server
323
324       UP     Up in the servers list
325
326       DOWN   Down in the servers list
327
328       q|ESC  Quit Glances
329

CONFIGURATION

331       No configuration file is mandatory to use Glances.
332
333       Furthermore a configuration file is needed to access more settings.
334

LOCATION

336       NOTE:
337          A  template  is  available  in  the  /usr{,/local}/share/doc/glances
338          (Unix-like) directory or directly on GitHub.
339
340       You can put your own glances.conf file in the following locations:
341
342                     ┌─────────────┬────────────────────────────┐
343Linux, SunOS │ ~/.config/glances/,        │
344                     │             │ /etc/glances/,             │
345                     │             │ /usr/share/docs/glances/   │
346                     ├─────────────┼────────────────────────────┤
347*BSD         │ ~/.config/glances/,        │
348                     │             │ /usr/local/etc/glances/,   │
349                     │             │ /usr/share/docs/glances/   │
350                     ├─────────────┼────────────────────────────┤
351macOS        │ ~/Library/Application Sup‐ │
352                     │             │ port/glances/,    /usr/lo‐ │
353                     │             │ cal/etc/glances/,          │
354                     │             │ /usr/share/docs/glances/   │
355                     ├─────────────┼────────────────────────────┤
356Windows      │ %APPDATA%\glances‐         │
357                     │             │ glances.conf               │
358                     └─────────────┴────────────────────────────┘
359
360       • On Windows XP, %APPDATA% is: C:\Documents and Settings\<USERNAME>\Ap‐
361         plication Data.
362
363       • On Windows Vista and later: C:\Users\<USERNAME>\AppData\Roaming.
364
365       User-specific options override system-wide options and options given on
366       the command line override either.
367

SYNTAX

369       Glances reads configuration files in the ini syntax.
370
371       A first section (called global) is available:
372
373          [global]
374          # Refresh rate (default is a minimum of 2 seconds)
375          # Can be overwrite by the -t <sec> option
376          # It is also possible to overwrite it in each plugin sections
377          refresh=2
378          # Does Glances should check if a newer version is available on PyPI ?
379          check_update=false
380          # History size (maximum number of values)
381          # Default is 28800: 1 day with 1 point every 3 seconds
382          history_size=28800
383
384       Each plugin, export module and application monitoring process (AMP) can
385       have a section. Below an example for the CPU plugin:
386
387          [cpu]
388          disable=False
389          refresh=3
390          user_careful=50
391          user_warning=70
392          user_critical=90
393          iowait_careful=50
394          iowait_warning=70
395          iowait_critical=90
396          system_careful=50
397          system_warning=70
398          system_critical=90
399          steal_careful=50
400          steal_warning=70
401          steal_critical=90
402
403       an InfluxDB export module:
404
405          [influxdb]
406          # Configuration for the --export influxdb option
407          # https://influxdb.com/
408          host=localhost
409          port=8086
410          user=root
411          password=root
412          db=glances
413          prefix=localhost
414          #tags=foo:bar,spam:eggs
415
416       or a Nginx AMP:
417
418          [amp_nginx]
419          # Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
420          enable=true
421          regex=\/usr\/sbin\/nginx
422          refresh=60
423          one_line=false
424          status_url=http://localhost/nginx_status
425
426       With Glances 3.0 or higher it is also possible to use dynamic  configu‐
427       ration  value using system command. For example, if you to set the pre‐
428       fix of an InfluxDB export to the current hostname, use:
429
430          [influxdb]
431          ...
432          prefix=`hostname`
433
434       Or if you want to add the Operating System name as a tag:
435
436          [influxdb]
437          ...
438          tags=system:`uname -a`
439

LOGGING

441       Glances logs all of its internal messages to a log file.
442
443       DEBUG messages can been logged using the -d option on the command line.
444
445       The location of the Glances depends of your operating system. You could
446       displayed  the  Glances log file full path using the``glances -V`` com‐
447       mand line.
448
449       The file is automatically rotate when the size is higher than 1 MB.
450
451       If you want to use another system path or change the log  message,  you
452       can use your own logger configuration. First of all, you have to create
453       a glances.json file with, for example, the following content (JSON for‐
454       mat):
455
456          {
457              "version": 1,
458              "disable_existing_loggers": "False",
459              "root": {
460                  "level": "INFO",
461                  "handlers": ["file", "console"]
462              },
463              "formatters": {
464                  "standard": {
465                      "format": "%(asctime)s -- %(levelname)s -- %(message)s"
466                  },
467                  "short": {
468                      "format": "%(levelname)s: %(message)s"
469                  },
470                  "free": {
471                      "format": "%(message)s"
472                  }
473              },
474              "handlers": {
475                  "file": {
476                      "level": "DEBUG",
477                      "class": "logging.handlers.RotatingFileHandler",
478                      "formatter": "standard",
479                      "filename": "/var/tmp/glances.log"
480                  },
481                  "console": {
482                      "level": "CRITICAL",
483                      "class": "logging.StreamHandler",
484                      "formatter": "free"
485                  }
486              },
487              "loggers": {
488                  "debug": {
489                      "handlers": ["file", "console"],
490                      "level": "DEBUG"
491                  },
492                  "verbose": {
493                      "handlers": ["file", "console"],
494                      "level": "INFO"
495                  },
496                  "standard": {
497                      "handlers": ["file"],
498                      "level": "INFO"
499                  },
500                  "requests": {
501                      "handlers": ["file", "console"],
502                      "level": "ERROR"
503                  },
504                  "elasticsearch": {
505                      "handlers": ["file", "console"],
506                      "level": "ERROR"
507                  },
508                  "elasticsearch.trace": {
509                      "handlers": ["file", "console"],
510                      "level": "ERROR"
511                  }
512              }
513          }
514
515       and start Glances using the following command line:
516
517          LOG_CFG=<path>/glances.json glances
518
519       NOTE:
520          Replace <path> by the folder where your glances.json file is hosted.
521

EXAMPLES

523       Monitor local machine (standalone mode):
524          $ glances
525
526       Monitor  local machine with the web interface (Web UI), run the follow‐
527       ing command line:
528          $ glances -w
529
530       and open a Web browser with the returned URL
531
532       Monitor local machine and export stats to a CSV file:
533          $ glances –export csv –export-csv-file /tmp/glances.csv
534
535       Monitor local machine and export stats to a InfluxDB server with 5s re‐
536       fresh  time  (also  possible  to export to OpenTSDB, Cassandra, Statsd,
537       ElasticSearch, RabbitMQ and Riemann):
538          $ glances -t 5 –export influxdb
539
540       It is also possible to export stats to multiple endpoints:
541          $ glances -t 5 –export influxdb,statsd,csv
542
543       Start a Glances server (server mode):
544          $ glances -s
545
546       Connect Glances to a Glances server (client mode):
547          $ glances -c <ip_server>
548
549       Connect to a Glances server and export stats to a StatsD server:
550          $ glances -c <ip_server> –export statsd
551
552       Start the client browser (browser mode):
553          $ glances –browser
554

AUTHOR

556       Nicolas Hennion aka Nicolargo <contact@nicolargo.com>
557
559       2022, Nicolas Hennion
560
561
562
563
5643.2.5                            Apr 10, 2022                       GLANCES(1)
Impressum