全栈开发
docker
【Q042】docker 中如何查看某个容器消耗的内存和CPU

docker 中如何查看某个容器消耗的内存和CPU

Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 43 (opens in a new tab)

Author 回答者: shfshanyue (opens in a new tab)

$ docker stats postgres
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
adb85849e229        postgres            0.00%               3.328MiB / 1.796GiB   0.18%               0B / 0B             874GB / 2.6GB       7