码迷,mamicode.com
首页 > 系统相关 > 详细

linux 调整最大文件打开数

时间:2017-11-06 23:03:14      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:limits.conf

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


本文出自 “12175273” 博客,请务必保留此出处http://12185273.blog.51cto.com/12175273/1979442

linux 调整最大文件打开数

标签:limits.conf

原文地址:http://12185273.blog.51cto.com/12175273/1979442

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!