docker可用容量 查看_查看docker容器占用内存

通过`ps -ef|grep 容器Id`和`top -p PID`命令,可以查看Docker容器的详细资源占用情况。本文介绍了如何获取容器ID,以及如何利用这些命令查看CPU使用率、内存使用等信息。
摘要由CSDN通过智能技术生成

ps -ef|grep 容器Id

[root@wentao-2 order]# ps -ef|grep 3a61cb3fd4f6

root 7358 12956 0 09:14 ? 00:00:00 containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/3a61cb3fd4f64f6fed464ca6c7185c5138c9256ac8ceb049b9527272573e994d -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc

root 7893 5652 0 09:19 pts/0 00:00:00 grep --color=auto 3a61cb3fd4f6

top -p 7358(pid)

[root@wentao-2 order]# top -p 7358

top - 09:22:14 up 103 days, 18:13, 2 users, load average: 0.04, 0.09, 0.12

Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie

%Cpu(s): 0.8 us, 0.3 sy, 0.0 ni, 98.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

KiB Mem : 8010424 total, 170620 free, 7303264 used, 536540 buff/cache

KiB Swap: 0 total, 0 free, 0 used. 369860 avail Mem

PID USER PR NI VIRT

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值