Use Top-like way to check containers information

1 minute read

Introduction

It’s not easy to check containers status with top/htop. With ctop, now we can check/display all containers status with top-like interface!

Installation

ctop is developed by Go, all we need to do is download and put binary to the right position, then we can start to monitor containers status! (Support Linux and macOs)

Linux

wget https://github.com/bcicen/ctop/releases/download/v0.4.1/ctop-0.4.1-linux-amd64 -O ctop
sudo mv ctop /usr/local/bin/
sudo chmod +x /usr/local/bin/ctop

Mac Os X

curl -Lo ctop https://github.com/bcicen/ctop/releases/download/v0.4.1/ctop-0.4.1-darwin-amd64
sudo mv ctop /usr/local/bin/
sudo chmod +x /usr/local/bin/ctop

Docker

Official also support running ctop in container. Just mount host docker socket as a volume into container, so that ctop can communicate with docker process.

docker run -ti -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest

CTOP Usage

We need to specify where is the docker host first before using it.

$ export DOCKER_HOST=tcp://127.0.0.1:4243
$ ctop

Keybindings

Following are keybindings list provided now.

keybindings

keybindings f

Use f to filter containers and find our desired ones. (Number is not support(2017/03/12))

f

keybindings s

Use s to sort containers with selecting fileds

s

Reference


comments powered by Disqus