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       +      Increase  selected process nice level / Lower the priority (need
243              right) - Only in standalone mode.
244
245       -      Decrease selected process nice  level   /  Higher  the  priority
246              (need right) - Only in standalone mode.
247
248       k      Kill selected process (need right) - Only in standalone mode.
249
250       K      Show/hide TCP connections
251
252       l      Show/hide log messages
253
254       m      Sort processes by MEM usage
255
256       M      Reset processes summary min/max
257
258       n      Show/hide network stats
259
260       N      Show/hide current time
261
262       p      Sort processes by name
263
264       P      Enable/Disable ports stats
265
266       q|ESC|CTRL-C
267              Quit the current Glances session
268
269       Q      Show/hide IRQ module
270
271       r      Reset history
272
273       R      Show/hide RAID plugin
274
275       s      Show/hide sensors stats
276
277       S      Enable/disable spark lines
278
279       t      Sort process by CPU times (TIME+)
280
281       T      View network I/O as combination
282
283       u      Sort processes by USER
284
285       U      View cumulative network I/O
286
287       w      Delete finished warning log messages
288
289       W      Show/hide Wifi module
290
291       x      Delete finished warning and critical log messages
292
293       z      Show/hide processes stats
294
295       0      Enable/disable Irix/Solaris mode
296
297              Task’s CPU usage will be divided by the total number of CPUs
298
299       1      Switch between global CPU and per-CPU stats
300
301       2      Enable/disable left sidebar
302
303       3      Enable/disable the quick look module
304
305       4      Enable/disable all but quick look and load module
306
307       5      Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
308
309       6      Enable/disable mean GPU mode
310
311       9      Switch UI theme between black and white
312
313       /      Switch between process command line or command name
314
315       F5     Refresh stats in curses user interface
316
317       LEFT   Navigation leff through process sort
318
319       RIGHT  Navigation right through process sort
320
321       UP     Up in the processes list
322
323       DOWN   Down in the processes list
324
325       In the Glances client browser (accessible through the --browser command
326       line argument):
327
328       ENTER  Run the selected server
329
330       UP     Up in the servers list
331
332       DOWN   Down in the servers list
333
334       q|ESC  Quit Glances
335

CONFIGURATION

337       No configuration file is mandatory to use Glances.
338
339       Furthermore a configuration file is needed to access more settings.
340

LOCATION

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

SYNTAX

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

LOGGING

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

EXAMPLES

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

AUTHOR

562       Nicolas Hennion aka Nicolargo <contact@nicolargo.com>
563
565       2023, Nicolas Hennion
566
567
568
569
5703.3.1                            Jan 14, 2023                       GLANCES(1)
Impressum