Glances

A terminal system monitoring tool written in Python. It works like Linux top command but shows more stats and supports export stats to external databases like Influxdb.

1. Play in Docker

https://glances.readthedocs.io/en/stable/docker.html

https://hub.docker.com/r/nicolargo/glances

docker pull nicolargo/glances:latest-alpine
# run in console mode
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it nicolargo/glances:latest-alpine

2. Use Guide

https://www.booleanworld.com/install-use-glances-monitor-linux-systems/

2.1. Interactive Commands

2.2. Searching/Filtering Processes

会车进入, E 恢复

3. Integration with Influxdb & Grafana

https://medium.com/@peter.jp.xie/setup-glances-influxdb-grafana-on-ubuntu-829c630bb441

4. Anatomy Of The Application

4.1. CPU

https://glances.readthedocs.io/en/stable/aoa/cpu.html

CPU stats description

user

system

irq (Linux, *BSD)

percent time spent servicing/handling hardware/software interrupts

iowait (Linux)

percent time spent by the CPU waiting for I/O operations to complete

ctx_sw

number of context switches (voluntary + involuntary) per second

inter

number of interrupts per second

sw_inter

number of software interrupts per second

syscal

4.2. GPU

https://glances.readthedocs.io/en/stable/aoa/gpu.html

pip install py3nvml

4.3. Processes List

https://glances.readthedocs.io/en/stable/aoa/ps.html

5. Reference


CategoryTool