ctop
Monitor container resource usage
TLDR
Show only [a]ctive containers
[r]everse the container sort order
[i]nvert the default colors
Display [h]elp
SYNOPSIS
ctop [OPTIONS]
PARAMETERS
--help
Show help message and exit.
--version
Show version and exit.
--host
Docker daemon socket to connect to (e.g., unix:///var/run/docker.sock, tcp://192.168.99.100:2376). Defaults to environment variables like DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH, then finally unix:///var/run/docker.sock.
--style
Theme of the UI (default: solarized).
--sort
Initial sorting field. Can be one of: id, name, cpu, mem, net_in, net_out, block_in, block_out. Defaults to 'cpu'.
--reverse
Reverse the sorting order (default: false).
--filter
Initial filter to apply. Supports container name or a regular expression.
--refresh-interval
Interval between screen refreshes (e.g., 1s, 500ms). Defaults to 1 second.
--title
Title of the UI. Defaults to 'ctop'.
--theme
Theme of the UI (default: solarized).
DESCRIPTION
ctop (Container TOP) provides a real-time, curses-based monitoring interface for Docker and container metrics. It allows you to view resource utilization (CPU, memory, network I/O, etc.) of running containers in a manner similar to the `top` command for processes. Ctop provides an interactive interface to filter, sort, and inspect container information in a convenient terminal-based view.
It's a very useful command for quickly identifying resource bottlenecks or misbehaving containers without having to use Docker's command line tools or third-party tools.
CAVEATS
Ctop requires access to the Docker daemon. Therefore, the user running ctop needs to have the necessary permissions to interact with the Docker socket. Performance can be affected with a very high number of running containers.
<B>INTERACTIVE COMMANDS</B>
Within ctop's interactive interface, the following commands are available:
Up/Down arrows or j/k: Navigate the container list.
Enter: Inspect a container.
q: Quit.
<B>CONFIGURATION</B>
Ctop's behavior can be customized through command-line flags or by using environment variables. Themes and other settings can be configured.
Refer to ctop documentation and --help command for more options.
HISTORY
ctop was developed as a more user-friendly alternative to the `docker stats` command for monitoring containers. It quickly gained popularity among developers and system administrators due to its interactive interface and ease of use.
It is a popular choice for viewing and troubleshooting container resource usage and performance.