美文网首页
容器性能分析

容器性能分析

作者: 日垒一砖 | 来源:发表于2022-04-20 15:45 被阅读0次

工具

  • systemd-cgtop
  • kubectl top
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
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

相关文章

网友评论

      本文标题:容器性能分析

      本文链接:https://www.haomeiwen.com/subject/llgiertx.html