天天看点

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

查看当前进程设置

#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 进程打开文件句柄设置

继续阅读