ctop – Real time Docker container monitoring tool

Ctop is a free open source for monitoring container metrics in real-time. A command-line tool like top to get an overview of metrics concerning CPU, memory, network, I/O for multiple containers and also supports for the specific container.

ctop comes with built-in support for Docker and runC. Use this link https://github.com/bcicen/ctop/releases to see latest updates.

Install ctop in Linux Server

It is an easy way to download binary /usr/local/bin/ctop and make it executable to run it.

[root@docker ~]# sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -O /usr/local/bin/ctop
[root@docker ~]# sudo chmod +x /usr/local/bin/ctop

Install ctop via Docker using following command.

[root@docker ~]# docker run --rm -ti --name=ctop -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest

Run ctop to monitor docker containers real-time metrics.

[root@docker ~]# ctop
Docker Container Monitor

Docker Container Monitor

To check specific container, use the Up and Down arrow keys to highlight a container and click Enter to select it or select your container and press “o”. This will show “single view” and click on it to inspect the selected container.



For more information check with Ctop Github repository.

[root@docker ~]# ctop --help
Usage of ctop:
-a show active containers only
-connector string
container connector to use (default "docker")
-f string
filter containers
-h display this help dialog
-i invert default colors
-r reverse container sort order
-s string
select container sort field
show cpu as % of system total
-v output version information and exit
[root@docker ~]#



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)
S Save current configuration to file
q Quit ctop