In this post, I’d like to introduce you to a nice command line tool called ctop. I discovered it when I was looking for a tool to monitor some Docker containers for a MongoDB replica set on my local machine while running some load tests.
ctop is basically a better version of docker stats. To install it on MacOS you can simply use
1$ brew install ctop 2
After that, just run
1$ ctop 2
Assuming you have some running Docker containers, the main view displays all running (and also all inactive) containers:
The columns are showing the same KPIs like memory, CPU usage and so on that you may know from docker stats. But … with ctop, you select a container (using up and down arrows) and perform the following actions on it:
- switch to a detail view of a single container
- inspect a container’s log
- stop a running container
- start and remove an inactive container (not shown in the above screenshot)
The detailed view looks like this and displays some time-based ASCII charts for the KPIs:
All in all, it is a nice tool that makes managing and monitoring Docker containers a bit easier.
For download and full documentation, check out the ctop GutHub page .
Dein Job bei codecentric?
More articles in this subject area\n
Discover exciting further topics and let the codecentric world inspire you.