1. Introduction
The ulimit command provides control over the resource that is consumed by the shell and or by the process that the shell initiates.
The persistence modification takes effect to write data in /etc/security/limits.conf .
The written format is:<domain><type><item><value>
Domain: username/user Group name/other (View man limits.conf)
Type:hard/soft, respectively, refers to the actual maximum type and the alert value type, one is Max, one is threshold, and warning is generated in threshold.
item:core/data/fsize/memlock/nofile/rss/stack/cpu/nproc/as/maxlogins/maxsyslogins/priority/locks/ sigpending/msgqueue/nice/rtprio/
Value: -1/unlimited/infinity/ Specific Value
To modify the maximum file descriptor , focus on item and value
2. Modifications
2.1 View the current user maximum number of file descriptors first:
1 ulimit-Hn2 ulimit-sn
2.2 Modify the maximum number of file descriptors for the current user process:
1 vim/etc/security/limits.conf2 add 3 user soft nofile at the end 4096 (user name) 4 User hard nofile 102405 Save log out and then log back in 6
Adjust the maximum Linux file descriptor for a process