查看当前进程设置

#ulimit -a

查看某个进程id 当前打开的文件句柄数:

比如进程id为9723

# lsof -p 9723 | wc -l

查看该进程的限制

#cat /proc/9723/limits

Centos 7 进程打开文件句柄设置

修改最大打开文件句柄限制:

#vim /etc/security/limits.conf

在文件末尾增加如下内容:

root soft nofile 65535
root hard nofile 65535
* soft nofile 65535
* hard nofile 65535

设置后,需重启该进程。

Centos 7 进程打开文件句柄设置

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2021-07-31
  • 2021-08-26
  • 2022-12-23
  • 2021-10-05
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2021-12-01
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案