ScriptsApr 16, 2026·3 min read

ctop — Top-Like Interface for Container Metrics

Real-time monitoring dashboard for Docker and runC containers, displaying CPU, memory, network, and I/O metrics in a familiar top-style terminal UI.

TL;DR
ctop is a single Go binary that displays live CPU, memory, and network stats for all running containers.
§01

What it is

ctop is a terminal-based monitoring tool that brings the familiar Unix top experience to Docker and runC containers. It displays live CPU, memory, network I/O, and disk I/O metrics per container in a scrollable table.

ctop targets developers and DevOps engineers who want quick container resource visibility without setting up a full monitoring stack like Prometheus plus Grafana.

§02

How it saves time or tokens

Instead of parsing docker stats output or piping JSON through jq, ctop provides instant visual feedback in a single command. It also lets you start, stop, pause, and remove containers directly from the TUI, eliminating context-switching to a separate terminal window.

§03

How to use

  1. Install ctop:
# macOS
brew install ctop
# Linux
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop
  1. Run ctop in your terminal. It auto-detects the Docker daemon.
  1. Use arrow keys to select a container and press Enter for detailed sparkline graphs.
§04

Example

# Launch ctop
ctop

# Filter containers by name
ctop -f web

# Sort by CPU usage
# Press 's' inside ctop, then select 'cpu'

# Connect to a remote Docker host
DOCKER_HOST=tcp://remote:2375 ctop
§05

Related on TokRepo

§06

Common pitfalls

  • ctop requires access to the Docker daemon socket. If running as a non-root user, add yourself to the docker group or use sudo.
  • The default refresh interval is 1 second which can cause high CPU on hosts with hundreds of containers. Use the -i flag to increase the interval.
  • ctop does not support Kubernetes pods directly. It monitors containers at the Docker/runC runtime level only.

Frequently Asked Questions

Does ctop work with Podman?+

ctop is designed for Docker and runC container runtimes. Podman compatibility depends on whether the Podman socket is configured to emulate the Docker API. With podman-docker installed and the socket active, ctop can connect.

Can ctop monitor remote Docker hosts?+

Yes. Set the DOCKER_HOST environment variable to point to a remote Docker daemon (e.g., tcp://remote:2375) and ctop will connect to that host instead of the local socket.

What metrics does ctop display?+

ctop shows CPU usage percentage, memory usage and limit, network bytes received and transmitted, and block I/O read and write per container. The detail view adds sparkline history graphs for each metric.

Is ctop a single binary with no dependencies?+

Yes. ctop is compiled as a single Go binary. It has no runtime dependencies beyond access to the Docker daemon socket or runC state directory.

How does ctop compare to docker stats?+

docker stats provides a streaming text table that is hard to sort or filter. ctop adds interactive sorting, filtering, container actions (stop, pause, remove), and sparkline history graphs in a full TUI experience.

Citations (3)
  • ctop GitHub— ctop is a top-like interface for container metrics supporting Docker and runC
  • Docker Documentation— Docker container stats API for resource usage monitoring
  • runC GitHub— runC is the OCI container runtime specification

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets