天天看點

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 程式打開檔案句柄設定

繼續閱讀