天天看点

linux加大服务器文件描述符

查看系统文件描述符

[[email protected] ~]# ulimit -n
65535
           

修改

[[email protected] ~]# echo '*                -       nofile          65535'>>/etc/security/limits.conf
[[email protected] ~]# tail -1 /etc/security/limits.conf
*                -       nofile          65535
           

配置完成后,重新登录生效。

查询

[[email protected] ~]# ulimit -a  显示当前的各种用户进程限制
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7271
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7271
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

           

继续阅读