容器常用命令

1.按照内存查看pod

kubectl top pods -A --sort-by=memory

2.查看io使用率,其中%util为已用IO百分比

iostat  -x 1

3. 按磁盘使用量降序排序并显示前 20 项

du -sh * |sort -hr|head -n20

4.查看容器日志对应的文件位置

docker inspect --format='{{.LogPath}}' <容器ID或名称>

 

posted @ 2024-11-13 08:52  潇潇暮鱼鱼  阅读(13)  评论(0)    收藏  举报