linux查看文件句柄信息

1. 查看当前系统的最大句柄数

ulimit -n

 

2. lsof

lsof命令查看有关文件句柄的详细信息,如当前系统打开的文件数量,哪些进程在使用这些文件句柄等等

查看进程PID打开的文件句柄详细信息:

lsof -p <pid>

 

查看当前进程打开了多少句柄数:

lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more

 

 

参考:

https://blog.csdn.net/qq_40910541/article/details/88965420

https://www.cnblogs.com/cloudwind2011/p/6409074.html

posted @ 2022-03-22 13:35  aganippe  阅读(3248)  评论(0编辑  收藏  举报