背景:有的时候容器内磁盘被莫名其妙的占满,这时候要考虑是不是宿主机上有程序锁定了容器内已删除文件,造成空间没有释放。 在主机上运行: lsof -s -p 95295 | grep deleted | \ awk 'BEGIN{printf "%10s %10s %10s %36s %10s\n","PROCESS","PID","FILE_SIZE","PATH","STATUS";printf "---------------------------------------------------------------------------------\n"};{printf "%10s %10s %10sGB %36s %10s\n",$1,$2,$7/1024/1024/1024,$9,$10}'
© 著作权归作者所有