1、单程序句柄数限制

查看配置的句柄数:ulimit -n

 

cat /etc/security/limits.conf

参考配置:

* soft nofile 655360
* hard nofile 655360

 

2、全局句柄数限制

cat /proc/sys/fs/file-max

参考配置:

6815744

 

3、分析句柄数常用命令

(1)统计各进程打开句柄数:lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr

(2)统计各用户打开句柄数:lsof -n|awk '{print $4}'|sort|uniq -c|sort -nr

(3)统计各命令打开句柄数:lsof -n|awk '{print $1}'|sort|uniq -c|sort -nr

 

相关文章:

  • 2022-12-23
  • 2021-07-31
  • 2022-02-09
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-05-16
  • 2022-02-01
猜你喜欢
  • 2021-05-22
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-02-21
相关资源
相似解决方案