ctop一款开源的docker容器监控工具,类似于htop这种系统的监控工具。

ctop提供多个容器的实时指标的简明扼要概述:

以及用于检查特定容器的单个容器视图。

ctop内置对 Docker 和 runC 的支持;其他容器和集群系统的连接器计划在未来发布。

Debian/Ubuntu

第三方维护



sudo apt-get install ca-certificates curl gnupg lsb-release
curl -fsSL https://azlux.fr/repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/azlux-archive-keyring.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian \
  $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/azlux.list >/dev/null
sudo apt-get update
sudo apt-get install docker-ctop

Arch



sudo pacman -S ctop

ctop is also available for Arch in the AUR

Linux (Generic)



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

OS X



brew install ctop

or



sudo port install ctop

or



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

Windows

ctop is available in scoop:



scoop install ctop

Docker



docker run --rm -ti \
  --name=ctop \
  --volume /var/run/docker.sock:/var/run/docker.sock:ro \
  quay.io/vektorlab/ctop:latest

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.

选项

选项描述
-a仅显示活动容器
-f <string>设置初始过滤字符串
-h显示帮助对话框
-i反转默认颜色
-r反向容器排序顺序
-s选择初始容器排序字段
-v输出版本信息并退出

键绑定

钥匙行动
打开容器菜单
a切换所有(运行和非运行)容器的显示
f过滤显示的容器(esc打开时清除)
H切换 ctop 标题
h打开帮助对话框
s选择容器排序字段
r反转容器排序顺序
o打开单一视图
l查看容器日志(t打开时切换时间戳)
e执行外壳
c配置列
S将当前配置保存到文件
q退出ctop

备择方案

有关与 Docker 一起使用的类似工具,请参阅Awesome Docker 列表

https://github.com/bcicen/ctop

标签: docker, 开源, 一款, 容器, ctop

添加新评论