linux lsof查看文件数
查看进程号下打开文件
[[email protected] ~]#lsof -p 25328
如果提示 -bash: lsof: command not found,则需要先安装lsof
[[email protected] ~]#yum install lsof
再执行第一条命令如下:
查看进程号下打开文件数
[[email protected] ~]#lsof -p 25328|wc -l
查看某用户下打开文件
[[email protected] ~]#lsof -u tomcat
查看某用户下打开文件数
[[email protected] ~]#lsof -u tomcat|wc -l
查看系统设置
[[email protected] ~]#ulimit -a