1 打开文件数各参数含义
参考 https://blog.csdn.net/xifeijian/article/details/9088137
查看某进程打开文件数
need-to-insert-img
2 统计文件所有进程文件数
lsof | awk '{print $2,$1}' | sort | uniq -c | sort -rn >> b.txt
need-to-insert-img
3 统计pid 进程打开的文件数
lsof -p pid
need-to-insert-img
4 统计pid 进程打开所有的文件数
lsof | awk "{print $NF}" | grep 10555 > product.txt
need-to-insert-img
5 分析pid 进程打开文件数连接 排序 和 统计
awk '{print $NF}' product.txt |sort |uniq -c |sort -nr > sort2.txt
need-to-insert-img