$linuxjunkies
>

ctop(1)

Top-like monitoring tool for container metrics and resource usage.

UbuntuDebianFedoraArch

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

FlagWhat it does
-a, --allShow all containers, including stopped ones
-f, --filter FILTERFilter containers by name or label (substring match)
-h, --helpDisplay help message and exit
-i, --interval SECONDSSet refresh interval in seconds (default: 1.0)
-o, --order-by FIELDInitial sort field: cpu, memory, name, or status
-p, --percpuShow per-CPU metrics instead of aggregated CPU usage
-r, --rate-window SECONDSTime window for rate calculations (default: 5.0)
-s, --sort-by FIELDSort by field on startup (cpu, memory, name)
-v, --versionShow version number and exit

Examples

Start ctop with default settings, showing running containers and real-time metrics

ctop

Display all containers including stopped ones for inspection

ctop -a

Filter display to show only containers with 'postgres' in their name

ctop -f postgres

Refresh metrics every 2 seconds, initially sorted by memory usage

ctop -i 2.0 -o memory

Display per-CPU metrics for each container instead of aggregated CPU

ctop -p

Start ctop sorted alphabetically by container name

ctop -s name

Related commands