Skip to content

ccarpinteri/ctop

 
 

Repository files navigation

ctop

release

Top-like interface for container metrics

ctop provides a concise and condensed overview of real-time metrics for multiple containers:

ctop

as well as a single container view for inspecting a specific container.

ctop comes with built-in support for Docker and runC; connectors for other container and cluster systems are planned for future releases.

Install

Fetch the latest release for your platform:

Linux (Generic)

wget https://github.com/ccarpinteri/ctop/releases/download/v0.2.2/ctop-0.2.2-linux-amd64.tar.xz
tar -xJf ctop-0.2.2-linux-amd64.tar.xz
sudo mv ctop /usr/local/bin/ctop
rm ctop-0.2.2-linux-amd64.tar.xz

OS X

curl -Lo ctop.tar.xz https://github.com/ccarpinteri/ctop/releases/download/v0.2.2/ctop-0.2.2-apple-darwin-arm64.tar.xz
tar -xJf ctop.tar.xz
sudo mv ctop /usr/local/bin/ctop
rm ctop.tar.xz

Windows

Download the latest Windows release and extract ctop.exe.

Docker

docker run --rm -it \
  --name=ctop \
  -v /var/run/docker.sock:/var/run/docker.sock \
  ghcr.io/ccarpinteri/ctop:latest

Building

Build steps can be found here.

Usage

ctop requires no arguments and uses Docker host variables by default. See connectors for further configuration options.

Config file

While running, use S to save the current filters, sort field, and other options to a default config path (~/.config/ctop/config on XDG systems, else ~/.ctop).

Config file values will be loaded and applied the next time ctop is started.

Options

Connection Options

Option Description
-H, --host HOST Docker daemon socket or TCP address (e.g., tcp://192.168.1.100:2376, unix:///var/run/docker.sock)
--context NAME Docker context to use
-c, --connector TYPE Container connector (default: docker)

Filtering Options

Option Description
-a, --all Show all containers (default: running only)
-f, --filter PATTERN Filter containers by name

Display Options

Option Description
-s, --sort FIELD Sort by: name, cpu, mem, net, io (default: name)
-r, --reverse Reverse sort order
-i, --invert Invert default colours

General Options

Option Description
-h, --help Display help
-v, --version Show version information

Keybindings

Key Action
<ENTER> Open container menu
a Toggle display of all (running and non-running) containers
f Filter displayed containers (esc to clear when open)
H Toggle ctop header
h Open help dialog
s Select container sort field
r Reverse container sort order
o Open single view
l View container logs (t to toggle timestamp when open)
e Exec Shell
c Configure columns
< Scroll left (show hidden columns on the left)
> Scroll right (show hidden columns on the right)
S Save current configuration to file
q Quit ctop

Alternatives

See Awesome Docker list for similar tools to work with Docker.

About

Top-like interface for container metrics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 97.4%
  • Shell 1.4%
  • Other 1.2%