ctop(1)
Top-like monitoring tool for container metrics and resource usage.
Synopsis
ctop [OPTIONS]Description
ctop provides a top-like interface for monitoring Docker containers and their resource consumption in real-time. It displays CPU, memory, network I/O, and block I/O metrics for all running containers on a host, with an interactive cursor-driven interface for sorting and filtering.
Requires Docker daemon access (typically root or docker group membership). Metrics are updated continuously, with refresh rates configurable via command-line flags.
Common options
| Flag | What it does |
|---|---|
-a, --all | Show all containers, including stopped ones |
-f, --filter FILTER | Filter containers by name or label (substring match) |
-h, --help | Display help message and exit |
-i, --interval SECONDS | Set refresh interval in seconds (default: 1.0) |
-o, --order-by FIELD | Initial sort field: cpu, memory, name, or status |
-p, --percpu | Show per-CPU metrics instead of aggregated CPU usage |
-r, --rate-window SECONDS | Time window for rate calculations (default: 5.0) |
-s, --sort-by FIELD | Sort by field on startup (cpu, memory, name) |
-v, --version | Show version number and exit |
Examples
Start ctop with default settings, showing running containers and real-time metrics
ctopDisplay all containers including stopped ones for inspection
ctop -aFilter display to show only containers with 'postgres' in their name
ctop -f postgresRefresh metrics every 2 seconds, initially sorted by memory usage
ctop -i 2.0 -o memoryDisplay per-CPU metrics for each container instead of aggregated CPU
ctop -pStart ctop sorted alphabetically by container name
ctop -s name