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

INTERACTIVE COMMANDS

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

CONFIGURATION

304       No configuration file is mandatory to use Glances.
305
306       Furthermore a configuration file is needed to access more settings.
307

LOCATION

309       NOTE:
310          A  template  is  available  in  the  /usr{,/local}/share/doc/glances
311          (Unix-like) directory or directly on GitHub.
312
313       You can put your own glances.conf file in the following locations:
314
315                     ┌─────────────┬────────────────────────────┐
316Linux, SunOS │ ~/.config/glances,         │
317                     │             │ /etc/glances               │
318                     ├─────────────┼────────────────────────────┤
319*BSD         │ ~/.config/glances,         │
320                     │             │ /usr/local/etc/glances     │
321                     ├─────────────┼────────────────────────────┤
322macOS        │ ~/Library/Application Sup‐ │
323                     │             │ port/glances,              │
324                     │             │ /usr/local/etc/glances     │
325                     ├─────────────┼────────────────────────────┤
326Windows      │ %APPDATA%\glances          │
327                     └─────────────┴────────────────────────────┘
328
329       · On   Windows  XP,  %APPDATA%  is:  C:\Documents  and  Settings\<USER‐
330         NAME>\Application Data.
331
332       · On Windows Vista and later: C:\Users\<USERNAME>\AppData\Roaming.
333
334       User-specific options override system-wide options and options given on
335       the command line override either.
336

SYNTAX

338       Glances reads configuration files in the ini syntax.
339
340       A first section (called global) is available:
341
342          [global]
343          # Does Glances should check if a newer version is available on PyPI?
344          check_update=true
345
346       Each plugin, export module and application monitoring process (AMP) can
347       have a section. Below an example for the CPU plugin:
348
349          [cpu]
350          user_careful=50
351          user_warning=70
352          user_critical=90
353          iowait_careful=50
354          iowait_warning=70
355          iowait_critical=90
356          system_careful=50
357          system_warning=70
358          system_critical=90
359          steal_careful=50
360          steal_warning=70
361          steal_critical=90
362
363       an InfluxDB export module:
364
365          [influxdb]
366          # Configuration for the --export influxdb option
367          # https://influxdb.com/
368          host=localhost
369          port=8086
370          user=root
371          password=root
372          db=glances
373          prefix=localhost
374          #tags=foo:bar,spam:eggs
375
376       or a Nginx AMP:
377
378          [amp_nginx]
379          # Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
380          enable=true
381          regex=\/usr\/sbin\/nginx
382          refresh=60
383          one_line=false
384          status_url=http://localhost/nginx_status
385
386       With Glances 3.0 or higher it is also possible to use dynamic  configu‐
387       ration  value using system command. For example, if you to set the pre‐
388       fix of an InfluxDB export to the current hostname, use:
389
390          [influxdb]
391          ...
392          prefix=`hostname`
393
394       Or if you want to add the Operating System name as a tag:
395
396          [influxdb]
397          ...
398          tags=system:`uname -a`
399

LOGGING

401       Glances logs all of its internal messages to a log file.
402
403       DEBUG messages can been logged using the -d option on the command line.
404
405       By default, the glances-USERNAME.log file is under the temporary direc‐
406       tory:
407
408                                 ┌────────┬────────┐
409*nix    │ /tmp   │
410                                 ├────────┼────────┤
411Windows │ %TEMP% │
412                                 └────────┴────────┘
413
414       · On  Windows XP, %TEMP% is: C:\Documents and Settings\<USERNAME>\Local
415         Settings\Temp.
416
417       · On Windows Vista and later: C:\Users\<USERNAME>\AppData\Local\Temp.
418
419       If you want to use another system path or change the log  message,  you
420       can use your own logger configuration. First of all, you have to create
421       a glances.json file with, for example, the following content (JSON for‐
422       mat):
423
424          {
425              "version": 1,
426              "disable_existing_loggers": "False",
427              "root": {
428                  "level": "INFO",
429                  "handlers": ["file", "console"]
430              },
431              "formatters": {
432                  "standard": {
433                      "format": "%(asctime)s -- %(levelname)s -- %(message)s"
434                  },
435                  "short": {
436                      "format": "%(levelname)s: %(message)s"
437                  },
438                  "free": {
439                      "format": "%(message)s"
440                  }
441              },
442              "handlers": {
443                  "file": {
444                      "level": "DEBUG",
445                      "class": "logging.handlers.RotatingFileHandler",
446                      "formatter": "standard",
447                      "filename": "/var/tmp/glances.log"
448                  },
449                  "console": {
450                      "level": "CRITICAL",
451                      "class": "logging.StreamHandler",
452                      "formatter": "free"
453                  }
454              },
455              "loggers": {
456                  "debug": {
457                      "handlers": ["file", "console"],
458                      "level": "DEBUG"
459                  },
460                  "verbose": {
461                      "handlers": ["file", "console"],
462                      "level": "INFO"
463                  },
464                  "standard": {
465                      "handlers": ["file"],
466                      "level": "INFO"
467                  },
468                  "requests": {
469                      "handlers": ["file", "console"],
470                      "level": "ERROR"
471                  },
472                  "elasticsearch": {
473                      "handlers": ["file", "console"],
474                      "level": "ERROR"
475                  },
476                  "elasticsearch.trace": {
477                      "handlers": ["file", "console"],
478                      "level": "ERROR"
479                  }
480              }
481          }
482
483       and start Glances using the following command line:
484
485          LOG_CFG=<path>/glances.json glances
486
487       NOTE:
488          Replace <path> by the folder where your glances.json file is hosted.
489

EXAMPLES

491       Monitor local machine (standalone mode):
492          $ glances
493
494       Note:  The  standalone  mode is not available on Microsoft Windows (c).
495       Glances will start in Web server mode on this operating system.
496
497       Monitor local machine with the web interface (Web UI):
498          $ glances -w
499
500       Monitor local machine and export stats to a CSV file:
501          $ glances –export csv –export-csv-file /tmp/glances.csv
502
503       Monitor local machine and export stats to a  InfluxDB  server  with  5s
504       refresh  time  (also possible to export to OpenTSDB, Cassandra, Statsd,
505       ElasticSearch, RabbitMQ and Riemann):
506          $ glances -t 5 –export influxdb
507
508       It is also possible to export stats to multiple endpoints:
509          $ glances -t 5 –export influxdb,statsd,csv
510
511       Start a Glances server (server mode):
512          $ glances -s
513
514       Connect Glances to a Glances server (client mode):
515          $ glances -c <ip_server>
516
517       Connect to a Glances server and export stats to a StatsD server:
518          $ glances -c <ip_server> –export statsd
519
520       Start the client browser (browser mode):
521          $ glances –browser
522

AUTHOR

524       Nicolas Hennion aka Nicolargo <contact@nicolargo.com>
525
527       2018, Nicolas Hennion
528
529
530
531
5323.0.2                            Sep 29, 2018                       GLANCES(1)
Impressum