Why Glances?

htop shows processes. Glances shows everything:

  • CPU, RAM, swap — Real-time usage and history.
  • Disk I/O — Per-disk read/write speeds.
  • Network — Per-interface bandwidth.
  • Docker containers — CPU/RAM per container.
  • Processes — Sorted by resource usage.
  • Sensors — Temperature, fan speed, battery.
  • Web UI + API — Monitor remotely.

Prerequisites

  • Docker on any Linux/macOS server.
  • At least 128 MB RAM.

Step 1: Deploy with Docker

docker run -d \
  --name glances \
  --restart=always \
  --pid host \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -p 61208:61208 \
  -e GLANCES_OPT="-w" \
  nicolargo/glances:latest-full

Access at http://your-server:61208.


Step 2: Monitoring Capabilities

MetricWhat it ShowsAlert Threshold
CPUUsage per core, load average, steal>70% warning, >90% critical
MemoryUsed/available, buffers, cache>70% warning, >90% critical
SwapUsage and I/O>50% warning
Disk I/ORead/write per disk (MB/s)Configurable
NetworkRX/TX per interface (Mbps)Configurable
DockerCPU/RAM/Net per containerConfigurable
ProcessesTop processes by CPU/RAMPer-process limits
SensorsTemperature, fan RPM>80°C warning
File systemsUsage per mount point>80% warning

Step 3: REST API

# CPU stats
curl http://localhost:61208/api/4/cpu

# Memory stats
curl http://localhost:61208/api/4/mem

# Docker container list
curl http://localhost:61208/api/4/containers

# All available endpoints
curl http://localhost:61208/api/4/pluginslist

Glances vs Alternatives

FeatureGlanceshtopbtopNetdata
Web UIYesNoNoYes
REST APIYesNoNoYes
Docker monitoringYesNoNoYes
Prometheus exportYesNoNoYes
Resource usage~50 MB RAM~5 MB~10 MB~200 MB
SetupOne commandInstalledPackageAgent install
Best forQuick overview + APITerminal power usersBeautiful terminalFull monitoring stack

Troubleshooting

ProblemSolution
Docker containers not showingMount Docker socket: -v /var/run/docker.sock:/var/run/docker.sock:ro
High CPU usage by GlancesIncrease refresh interval: GLANCES_OPT="-w --time 5" (5 seconds)
Sensors not detectedUse latest-full image tag which includes sensor libraries
API returns 403Set --disable-webui if only using API; check bind address

Summary

  • One-screen overview of CPU, RAM, disk, network, Docker, and processes.
  • Web UI + REST API for remote monitoring and automation.
  • Prometheus export for integration with existing monitoring stacks.
  • Lightweight — ~50 MB RAM vs Netdata’s ~200 MB.