# 桀蝟餌絞閮剖 (ulimit -a # 舀亦券典)/ J g5 B, w' M# @1 n: w1 u! w
ulimit -n $ D4 K; Z- T, d' B' j
1024
# S* g" ]3 ` i2 l. i% P q
2 {) x1 P5 L% E2 O1 a( {! d! G' v4 Q0 J
# limits.conf 閮剖 nofile (nofile - max number of open files) 憭批, F% c! m0 _8 M
vim /etc/security/limits.conf
' q/ C" B- F2 ~ f( h) F3 F
+ U; p+ c' A6 j8 h& O+ f: j, F8 | f
# 憓/靽格 銝餈啣抵 ( 2^20 = 1048576 )% i) j) Q# H: a4 \& L. `2 ^
* soft nofile 1048576
* o( _ r5 H7 E5 s* hard nofile 10485763 A7 H, Y9 U; O4 P2 y8 T) A
' | @* }# ]" {' S
% h# R' \% d+ y+ e+ D8 {1 D5 \# 餃箏, 餃, 瑁撠望箇暹迨0 o# t$ F, C2 l' ^! q9 L
ulimit -n
) c1 T6 x; D- }. j" |6 s10485763 T* q; U* m+ G( x/ x& i2 x3 q
ulimit -n 瘝箇 1048576 閰, 臭蝙典撥嗉身摰
v' m, U3 C; i0 s$ z* y3 d. b a9 @+ T J) v5 e1 e
! p$ C! ^/ H1 x6 M0 D% F' Vulimit -n 1048576( R2 i0 ^4 M7 k, W3 J
2 V/ r: a. p( C$ p2 P# l
7 t# C) {) c" m8 f# E0 }# 瑼X亥身摰
6 s8 V+ {- V# p1 Qulimit -n
( H! B( _$ f3 t9 q# w1048576
( p9 x$ ^ P6 |# L" l: l! o& r' ` |
|