1 打開文件數(shù)各參數(shù)含義
參考?https://blog.csdn.net/xifeijian/article/details/9088137
查看某進(jìn)程打開文件數(shù)
need-to-insert-img
2 統(tǒng)計(jì)文件所有進(jìn)程文件數(shù)
lsof | awk '{print $2,$1}' | sort | uniq -c | sort -rn >> b.txt
need-to-insert-img
3 統(tǒng)計(jì)pid 進(jìn)程打開的文件數(shù)
lsof -p pid
need-to-insert-img
4 統(tǒng)計(jì)pid 進(jìn)程打開所有的文件數(shù)
lsof ?| ?awk "{print $NF}" | grep 10555 ?> product.txt
need-to-insert-img
5 分析pid 進(jìn)程打開文件數(shù)連接 ?排序 和 統(tǒng)計(jì)
awk '{print $NF}' product.txt |sort |uniq -c |sort -nr > sort2.txt
need-to-insert-img