1GLANCES(1) Glances GLANCES(1)
2
3
4
5<<<<<<< HEAD =======
6
7
8
9GLANCES(1) Glances GLANCES(1)
10
11
12
13>>>>>>> master
14
16 glances - An eye on your system
17
19 glances [OPTIONS]
20
22 glances is a cross-platform curses-based monitoring tool which aims to
23 present a maximum of information in a minimum of space, ideally to fit
24 in a classical 80x24 terminal or higher to have additional information.
25 It can adapt dynamically the displayed information depending on the
26 terminal size. It can also work in client/server mode. Remote monitor‐
27 ing could be done via terminal or web interface.
28
29 glances is written in Python and uses the psutil library to get infor‐
30 mation from your system.
31
34 -h, --help
35 show this help message and exit
36
37 -V, --version
38 show program’s version number and exit
39
40 -d, --debug
41 enable debug mode
42
43 -C CONF_FILE, --config CONF_FILE
44 path to the configuration file
45
46 -modules-list
47 display modules (plugins & exports) list and exit
48
49 --disable-plugin PLUGIN
50 disable PLUGIN (comma separed list)
51
52 --stdout PLUGINS_STATS
53 display stats to stdout (comma separated list of plugins/plug‐
54 ins.attribute)
55
56 --export EXPORT
57 enable EXPORT module (comma separed list)
58
59 --export-csv-file EXPORT_CSV_FILE
60 file path for CSV exporter
61
62 --export-json-file EXPORT_JSON_FILE
63 file path for JSON exporter
64
65 --disable-process
66 disable process module (reduce Glances CPU consumption)
67
68 --disable-webui
69 disable the Web UI (only the RESTful API will respond)
70
71 --light, --enable-light
72 light mode for Curses UI (disable all but top menu)
73
74 -0, --disable-irix
75 task’s CPU usage will be divided by the total number of CPUs
76
77 -1, --percpu
78 start Glances in per CPU mode
79
80 -2, --disable-left-sidebar
81 disable network, disk I/O, FS and sensors modules
82
83 -3, --disable-quicklook
84 disable quick look module
85
86 -4, --full-quicklook
87 disable all but quick look and load
88
89 -5, --disable-top
90 disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
91
92 -6, --meangpu
93 start Glances in mean GPU mode
94
95 --enable-history
96 enable the history mode
97
98 --disable-bold
99 disable bold mode in the terminal
100
101 --disable-bg
102 disable background colors in the terminal
103
104 --enable-process-extended
105 enable extended stats on top process
106
107 -c CLIENT, --client CLIENT
108 connect to a Glances server by IPv4/IPv6 address, hostname or
109 hostname:port
110
111 -s, --server
112 run Glances in server mode
113
114 --browser
115 start the client browser (list of servers)
116
117 --disable-autodiscover
118 disable autodiscover feature
119
120 -p PORT, --port PORT
121 define the client/server TCP port [default: 61209]
122
123 -B BIND_ADDRESS, --bind BIND_ADDRESS
124 bind server to the given IPv4/IPv6 address or hostname
125
126 --username
127 define a client/server username
128
129 --password
130 define a client/server password
131
132 --snmp-community SNMP_COMMUNITY
133 SNMP community
134
135 --snmp-port SNMP_PORT
136 SNMP port
137
138 --snmp-version SNMP_VERSION
139 SNMP version (1, 2c or 3)
140
141 --snmp-user SNMP_USER
142 SNMP username (only for SNMPv3)
143
144 --snmp-auth SNMP_AUTH
145 SNMP authentication key (only for SNMPv3)
146
147 --snmp-force
148 force SNMP mode
149
150 -t TIME, --time TIME
151 set refresh time in seconds [default: 3 sec]
152
153 -w, --webserver
154 run Glances in web server mode (bottle lib needed)
155
156 --cached-time CACHED_TIME
157 set the server cache time [default: 1 sec]
158
159 open-web-browser
160 try to open the Web UI in the default Web browser
161
162 -q, --quiet
163 do not display the curses interface
164
165 -f PROCESS_FILTER, --process-filter PROCESS_FILTER
166 set the process filter pattern (regular expression)
167
168 --process-short-name
169 force short name for processes name
170
171 --hide-kernel-threads
172 hide kernel threads in process list (not available on Windows)
173
174 -b, --byte
175 display network rate in byte per second
176
177 --diskio-show-ramfs
178 show RAM FS in the DiskIO plugin
179
180 --diskio-iops
181 show I/O per second in the DiskIO plugin
182
183 --fahrenheit
184 display temperature in Fahrenheit (default is Celsius)
185
186 --fs-free-space
187 display FS free space instead of used
188
189 --theme-white
190 optimize display colors for white background
191
192 --disable-check-update
193 disable online Glances version ckeck
194
196 The following commands (key pressed) are supported while in Glances:
197
198 ENTER Set the process filter
199
200 NOTE:
201 On macOS please use CTRL-H to delete filter.
202
203 Filter is a regular expression pattern:
204
205 · gnome: matches all processes starting with the gnome string
206
207 · .*gnome.*: matches all processes containing the gnome string
208
209 a Sort process list automatically
210
211 · If CPU >70%, sort processes by CPU usage
212
213 · If MEM >70%, sort processes by MEM usage
214
215 · If CPU iowait >60%, sort processes by I/O read and write
216
217 A Enable/disable Application Monitoring Process
218
219 b Switch between bit/s or Byte/s for network I/O
220
221 B View disk I/O counters per second
222
223 c Sort processes by CPU usage
224
225 d Show/hide disk I/O stats
226
227 D Enable/disable Docker stats
228
229 e Enable/disable top extended stats
230
231 E Erase current process filter
232
233 f Show/hide file system and folder monitoring stats
234
235 F Switch between file system used and free space
236
237 g Generate graphs for current history
238
239 h Show/hide the help screen
240
241 i Sort processes by I/O rate
242
243 I Show/hide IP module
244
245 l Show/hide log messages
246
247 m Sort processes by MEM usage
248
249 M Reset processes summary min/max
250
251 n Show/hide network stats
252
253 N Show/hide current time
254
255 p Sort processes by name
256
257 q|ESC|CTRL-C
258 Quit the current Glances session
259
260 Q Show/hide IRQ module
261
262 r Reset history
263
264 R Show/hide RAID plugin
265
266 s Show/hide sensors stats
267
268 t Sort process by CPU times (TIME+)
269
270 T View network I/O as combination
271
272 u Sort processes by USER
273
274 U View cumulative network I/O
275
276 w Delete finished warning log messages
277
278 W Show/hide Wifi module
279
280 x Delete finished warning and critical log messages
281
282 z Show/hide processes stats
283
284 0 Enable/disable Irix/Solaris mode
285
286 Task’s CPU usage will be divided by the total number of CPUs
287
288 1 Switch between global CPU and per-CPU stats
289
290 2 Enable/disable left sidebar
291
292 3 Enable/disable the quick look module
293
294 4 Enable/disable all but quick look and load module
295
296 5 Enable/disable top menu (QuickLook, CPU, MEM, SWAP and LOAD)
297
298 6 Enable/disable mean GPU mode
299
300 / Switch between process command line or command name
301
302 In the Glances client browser (accessible through the --browser command
303 line argument):
304
305 ENTER Run the selected server
306
307 UP Up in the servers list
308
309 DOWN Down in the servers list
310
311 q|ESC Quit Glances
312
314 No configuration file is mandatory to use Glances.
315
316 Furthermore a configuration file is needed to access more settings.
317
319 NOTE:
320 A template is available in the /usr{,/local}/share/doc/glances
321 (Unix-like) directory or directly on GitHub.
322
323 You can put your own glances.conf file in the following locations:
324
325 ┌─────────────┬────────────────────────────┐
326 │Linux, SunOS │ ~/.config/glances, │
327 │ │ /etc/glances │
328 ├─────────────┼────────────────────────────┤
329 │*BSD │ ~/.config/glances, │
330 │ │ /usr/local/etc/glances │
331 ├─────────────┼────────────────────────────┤
332 │macOS │ ~/Library/Application Sup‐ │
333 │ │ port/glances, │
334 │ │ /usr/local/etc/glances │
335 └─────────────┴────────────────────────────┘
336
337
338 │Windows │ %APPDATA%\glances │
339 └─────────────┴────────────────────────────┘
340
341 · On Windows XP, %APPDATA% is: C:\Documents and Settings\<USER‐
342 NAME>\Application Data.
343
344 · On Windows Vista and later: C:\Users\<USERNAME>\AppData\Roaming.
345
346 User-specific options override system-wide options and options given on
347 the command line override either.
348
350 Glances reads configuration files in the ini syntax.
351
352 A first section (called global) is available:
353
354 [global]
355 # Does Glances should check if a newer version is available on PyPI?
356 check_update=true
357
358 Each plugin, export module and application monitoring process (AMP) can
359 have a section. Below an example for the CPU plugin:
360
361 [cpu]
362 disable=false
363 user_careful=50
364 user_warning=70
365 user_critical=90
366 iowait_careful=50
367 iowait_warning=70
368 iowait_critical=90
369 system_careful=50
370 system_warning=70
371 system_critical=90
372 steal_careful=50
373 steal_warning=70
374 steal_critical=90
375
376 an InfluxDB export module:
377
378 [influxdb]
379 # Configuration for the --export influxdb option
380 # https://influxdb.com/
381 host=localhost
382 port=8086
383 user=root
384 password=root
385 db=glances
386 prefix=localhost
387 #tags=foo:bar,spam:eggs
388
389 or a Nginx AMP:
390
391 [amp_nginx]
392 # Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
393 enable=true
394 regex=\/usr\/sbin\/nginx
395 refresh=60
396 one_line=false
397 status_url=http://localhost/nginx_status
398
399 With Glances 3.0 or higher it is also possible to use dynamic configu‐
400 ration value using system command. For example, if you to set the pre‐
401 fix of an InfluxDB export to the current hostname, use:
402
403 [influxdb]
404 ...
405 prefix=`hostname`
406
407 Or if you want to add the Operating System name as a tag:
408
409 [influxdb]
410 ...
411 tags=system:`uname -a`
412
414 Glances logs all of its internal messages to a log file.
415
416 DEBUG messages can been logged using the -d option on the command line.
417
418 By default, the glances-USERNAME.log file is under the temporary direc‐
419 tory:
420
421 ┌────────┬────────┐
422 │*nix │ /tmp │
423 ├────────┼────────┤
424 │Windows │ %TEMP% │
425 └────────┴────────┘
426
427 · On Windows XP, %TEMP% is: C:\Documents and Settings\<USERNAME>\Local
428 Settings\Temp.
429
430 · On Windows Vista and later: C:\Users\<USERNAME>\AppData\Local\Temp.
431
432 If you want to use another system path or change the log message, you
433 can use your own logger configuration. First of all, you have to create
434 a glances.json file with, for example, the following content (JSON for‐
435 mat):
436
437 {
438 "version": 1,
439 "disable_existing_loggers": "False",
440 "root": {
441 "level": "INFO",
442 "handlers": ["file", "console"]
443 },
444 "formatters": {
445 "standard": {
446 "format": "%(asctime)s -- %(levelname)s -- %(message)s"
447 },
448 "short": {
449 "format": "%(levelname)s: %(message)s"
450 },
451 "free": {
452 "format": "%(message)s"
453 }
454 },
455 "handlers": {
456 "file": {
457 "level": "DEBUG",
458 "class": "logging.handlers.RotatingFileHandler",
459 "formatter": "standard",
460 "filename": "/var/tmp/glances.log"
461 },
462 "console": {
463 "level": "CRITICAL",
464 "class": "logging.StreamHandler",
465 "formatter": "free"
466 }
467 },
468 "loggers": {
469 "debug": {
470 "handlers": ["file", "console"],
471 "level": "DEBUG"
472 },
473 "verbose": {
474 "handlers": ["file", "console"],
475 "level": "INFO"
476 },
477 "standard": {
478 "handlers": ["file"],
479 "level": "INFO"
480 },
481 "requests": {
482 "handlers": ["file", "console"],
483 "level": "ERROR"
484 },
485 "elasticsearch": {
486 "handlers": ["file", "console"],
487 "level": "ERROR"
488 },
489 "elasticsearch.trace": {
490 "handlers": ["file", "console"],
491 "level": "ERROR"
492 }
493 }
494 }
495
496 and start Glances using the following command line:
497
498 LOG_CFG=<path>/glances.json glances
499
500 NOTE:
501 Replace <path> by the folder where your glances.json file is hosted.
502
504 Monitor local machine (standalone mode):
505 $ glances
506
507 Note: The standalone mode is not available on Microsoft Windows (c).
508 Glances will start in Web server mode on this operating system.
509
510 Monitor local machine with the web interface (Web UI):
511 $ glances -w
512
513 Monitor local machine and export stats to a CSV file:
514 $ glances –export csv –export-csv-file /tmp/glances.csv
515
516 Monitor local machine and export stats to a InfluxDB server with 5s
517 refresh time (also possible to export to OpenTSDB, Cassandra, Statsd,
518 ElasticSearch, RabbitMQ and Riemann):
519 $ glances -t 5 –export influxdb
520
521 It is also possible to export stats to multiple endpoints:
522 $ glances -t 5 –export influxdb,statsd,csv
523
524 Start a Glances server (server mode):
525 $ glances -s
526
527 Connect Glances to a Glances server (client mode):
528 $ glances -c <ip_server>
529
530 Connect to a Glances server and export stats to a StatsD server:
531 $ glances -c <ip_server> –export statsd
532
533 Start the client browser (browser mode):
534 $ glances –browser
535
537 Nicolas Hennion aka Nicolargo <contact@nicolargo.com>
538
540 2019, Nicolas Hennion
541
542
543
544
5453.0.2 Sep 29, 2018 GLANCES(1)