您的位置:首页 > 运维架构 > Linux

linux 调整最大文件打开数

2017-11-06 21:53 190 查看
vim /etc/security/limits.conf添加以下内容

* soft nofile 65535
* hard nofile 65535
并添加开机启动
vim /etc/rc.local
ulimit -SHn 65535
附nginx进程下检查最大文件打开数脚本
#!/bin/bash
for pid in `ps aux | grep nginx | grep -v grep |awk '{print $2}'`
do
cat /proc/${pid}/limits | grep 'max open files'
done
by:rm_rf_db
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  conf limits