容器性能分析

2022-04-20  本文已影响0人  日垒一砖

工具

kubectl top node --sort-by=memory
kubectl top node --sort-by=cpu

kubectl top pod -A --sort-by=cpu | head
kubectl top pod -A --sort-by=memory | head
docker stats --no-stream 
# default format
docker stats --no-stream --format "table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"
# truncate name
docker stats --no-stream --format 'table {{.ID}}\t{{ printf "%.30s" .Name }}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}' | head

示例

sudo systemd-cgtop

image.png

docker stats

image.png

Reference

上一篇 下一篇

猜你喜欢

热点阅读