# 桀蝟餌絞閮剖 (ulimit -a # 舀亦券典)/ C( H: E/ D4 M3 n
ulimit -n $ y* [& v3 c! d" y( L% C. W3 x5 e" p
1024
- t& j6 w; Q. Q
- H( w4 t- k3 R- r
1 k0 p4 ]: r$ {7 p4 F# limits.conf 閮剖 nofile (nofile - max number of open files) 憭批2 D5 Z( v. v. k9 M2 H
vim /etc/security/limits.conf
7 w) d" t6 w4 i, L1 G9 z3 s
( e! y. ]9 D! p9 X( m
. `4 b6 @' }% i% \: ^* D/ c# 憓/靽格 銝餈啣抵 ( 2^20 = 1048576 )
9 m; D; S4 L. e* soft nofile 10485765 N% P8 d0 b0 n' u3 c# q0 w( {: s
* hard nofile 1048576
. K1 a: P; f* r4 e/ x/ w: s, b: c: V1 ?9 P3 `. n5 e' C L
$ y& s7 ^9 S! U
# 餃箏, 餃, 瑁撠望箇暹迨- Q- t4 ~$ J/ p- y, p. C
ulimit -n
, {: p& U+ c4 `8 Q( v# `( p: }6 P1048576; s1 C" o8 c- }2 \, G- A7 B/ Y& S
ulimit -n 瘝箇 1048576 閰, 臭蝙典撥嗉身摰2 A1 R7 P$ M9 O
- w' g5 W6 m0 S
9 F4 `7 o5 P" P4 ^2 }
ulimit -n 1048576
, z7 T1 J8 F' h- N
& m/ E. Y# ^) T: [5 R# E# B. f3 a6 e* }/ d, s2 t# b) N2 M
# 瑼X亥身摰
% W. Z" a- f+ dulimit -n. |8 g* }/ r0 w6 G/ s( r
1048576
& W6 T( } b) u/ L+ N |
|