LinuxCommandLibrary

ctop

Monitor container resource usage

TLDR

Show only [a]ctive containers

$ ctop -a
copy

[r]everse the container sort order
$ ctop -r
copy

[i]nvert the default colors
$ ctop -i
copy

Display [h]elp
$ ctop -h
copy

SYNOPSIS

ctop [options]

PARAMETERS

-a, --address string
    Address to listen on for server mode (default: ":5000")

-d, --docker string
    Docker endpoint (default: "unix:///var/run/docker.sock")

-f, --filter string
    Filter expression for containers (e.g., name=image)

-i, --image
    Show image name instead of ID

-l, --logfile string
    Path to log file

-n, --lines int
    Screen height (default: inferred)

-p, --pods
    Show Kubernetes pods instead of containers

-r, --rsh string
    Remote shell binary (default: "ssh")

-s, --server string
    Remote server address for monitoring

-t, --type string
    Runtime type: docker|containerd|crio|k8s (default: "docker")

-u, --user string
    Remote SSH user (default: "root")

-v, --version
    Print version information

--cgroup-memory string
    Cgroup memory path (default: "/sys/fs/cgroup/memory")

--cgroup-v1
    Force cgroup v1 paths

--debug
    Enable debug HTTP server

--full
    Full screen mode

--no-tables
    Disable table rendering

--raw
    Show raw metrics

--rows int
    Screen width (default: inferred)

DESCRIPTION

ctop is an interactive command-line utility that provides a top-like interface for monitoring resource usage of containers across various runtimes like Docker, containerd, CRI-O, and Kubernetes.

It displays real-time metrics including CPU, memory, network I/O, and PIDs for running containers in a colorful, sortable table. Users can filter, search, and kill containers directly from the interface. Designed for simplicity and efficiency, ctop auto-detects the runtime and supports remote monitoring via SSH.

Ideal for DevOps, sysadmins, and developers managing containerized environments, it offers low overhead monitoring without needing a full dashboard like Prometheus or Grafana. Supports cgroup v1/v2, raw metrics, and custom filters for precise troubleshooting.

CAVEATS

Requires access to container socket (e.g., Docker socket perms); high-privilege needed for remote/cgroup access. Not installed by default—install via binaries or Go. May conflict with cgroup v2 setups without flags.

KEY BINDINGS

q: quit | f: toggle filters | F: filter by name | k: kill container | /: search | ?: help | Arrow keys: navigate/sort

INSTALLATION

Download binaries from GitHub releases or go install github.com/bcicen/ctop@latest. Supports Linux/macOS/Windows.

HISTORY

Developed by Alex Guerrieri in 2017 as open-source project on GitHub (bcurren/ctop). Initially Docker-focused, expanded to containerd/CRI-O/K8s by 2019. Actively maintained with v0.7.x releases supporting modern runtimes and cgroup v2.

SEE ALSO

top(1), htop(1), docker(1), podman(1), crictl(1)

Copied to clipboard