ºìÁªLinuxÃÅ»§
Linux°ïÖú

AIX Óû§µÄϵͳ×ÊԴʹÓÃÏÞÖÆ

·¢²¼Ê±¼ä:2007-04-08 00:38:50À´Ô´:ºìÁª×÷Õß:Dragoncity
ÊÊÓòÙ×÷ϵͳ
AIX V4
ÍøÂçÅäÖò½Öè
AIX Óû§Ê¹ÓõÄϵͳ×ÊÔ´ÏÞÖÆ°üÀ¨Á½¸ö¸ÅÄî --- Ó²ÏÞÖÆ(hard limits) ºÍÈíÏÞÖÆ(soft limits)¡£
hard limits×ÔAIX 4.1°æ±¾¿ªÊ¼ÒýÈë¡£hard limits Ó¦ÓÉAIXϵͳ¹ÜÀíÔ±ÉèÖã¬Ö»ÓÐsecurity×éµÄ³ÉÔ±¿ÉÒÔ½«´ËÖµÔö´ó£¬Óû§±¾Éí¿ÉÒÔ¼õС´ËÏÞ¶¨Öµ,µ«ÊÇÆä¸ü¸Ä½«ËæןÃÓû§´ÓϵͳÍ˳ö¶øʧЧ¡£Ê¹ÓÃÏÂÁÐÃüÁî¿ÉÒԲ鿴hard limitsµÄÏÞ¶¨Öµ£º
ulimit -Ha
soft limits ÊÇAIXºËÐÄʹÓõÄÏÞÖƽø³Ì¶Ôϵͳ×ÊÔ´µÄʹÓõÄÉÏÏÞÖµ¡£´ËÖµ¿ÉÓÉÈκÎÈ˸ü¸Ä£¬µ«²»Äܳ¬³öhard limitsÖµ¡£ÕâÀïҪעÒâµÄÊÇÖ»ÓÐsecurity×éµÄ³ÉÔ±¿Éʹ¸ü¸ÄÓÀ¾ÃÉúЧ£¬ÆÕͨÓû§µÄ¸ü¸ÄÔÚÆäÍ˳öϵͳºó½«Ê§Ð§¡£Ê¹ÓÃÒÔÏÂÃüÁî¿ÉÒԲ鿴soft limitsµÄÉèÖãº
ulimit -a
ÏÂÃæΪϵͳµÄsoft limitsµÄĬÈÏÖµ£º
3.2 4.1-4.3
=============== =================
fsize = 2097151 fsize = 2097151
core = 2048 core = 2048
cpu = 3600 cpu = -1
data = 131072 data = 262144
rss = 65536 rss = 65536
stack = 8192 stack = 65536
nofiles = 2000* nofiles=2000 *
* ¸ÃÖµ(nofiles)Ö»ÄÜÔÚAIX 4.3.1 »òÒÔºóµÄ°æ±¾Öиü¸Ä¡£
ÉÏÊö¶¨Òå×÷ΪĬÈÏÖµ´æ·ÅÔÚÎļþ /etc/security/limits ÖУ¬ÔÚÐÂÓû§±»¼Ó½øϵͳºóÉúЧ¡£Ö±½Ó¸ü¸Ä´ËÎļþÖеĶ¨ÒåÖµÐèÒª½«ÏµÍ³ÖØÐÂÆô¶¯ÒÔ±ãʹ¸ü¸ÄÉúЧ¡£½«ÏàÓ¦Öµ¸ÃΪ"-1" ±íʾ²»ÊÜ soft limitsµÄÏÞÖÆ£¨unlimited)¡£
ÏÂÃæÎÒÃǽ«¾Í¸÷×Ö¶ÎÖðÒ»½øÐнéÉÜ£º
fsize Óû§´´½¨µÄÎļþ´óСÏÞÖÆ¡£´Ë¶¨ÒåÖµ£¨512×Ö½ÚΪµ¥Î»£©Îª¸ÃÓû§¿ÉÒÔÉú³ÉµÄ×î´óÎļþµÄ´óС¡£
core Éú³ÉµÄcoreÎļþ´óСµÄÏÞÖÆ£¨512×Ö½ÚΪµ¥Î»£©¡£
cpu Óû§½ø³Ì¿ÉÓÃcpuµÄÏÞ¶¨Öµ£¨ÒÔÃëΪµ¥Î»£©¡£ÆÕͨÓû§Ö»Äܽ«´ËÖµ¼õС£¬root¿ÉÒÔ½«´ËÖµÔö´ó¡£ÕâÀïҪעÒâµÄ
Êǽø³ÌʹÓÃCPUµÄʱ¼äÈ¡¾öÓÚAIX Kernel£¨ºËÐijÌÐò£©½ø³Ìµ÷¶ÈËã·¨£¬¸ÃÖµÔڴ˽ö×ö²Î¿¼¡£
data ½ø³ÌÊý¾Ý¶Î´óСµÄÏÞ¶¨Öµ£¨ÒÔ×Ö½ÚΪµ¥Î»£©¡£
stack ½ø³Ì¶ÑÕ»¶Î´óСµÄÏÞ¶¨Öµ£¨ÒÔ×Ö½ÚΪµ¥Î»£©¡£
rss ½ø³Ì³£×¤ÄÚ´æ¶ÎµÄÏÞ¶¨Öµ£¨ÒÔ×Ö½ÚΪµ¥Î»£©¡£AIXºËÐIJ¢²»²Î¿¼´ËÏÞ¶¨¡£
nofiles ½ø³ÌÖдò¿ªÎļþµÄ×î´óÊýÁ¿¡£´ËÏÞ¶¨ÔÚAIX 4.3.1֮ǰµÄ°æ±¾Öй̶¨Îª2000¡£ÔÚAIX 4.3.1¼°ÆäÖ®ºóµÄ°æ±¾Öпɽ«´ËÖµÔö´óÖÁ32767¡£
ÏÂÃæ½éÉÜÈýÖÖÐÞ¸ÄÉÏÊöÏÞ¶¨ÖµµÄ·½·¨£º
1. ±à¼­Îļþ/etc/security/limits£¬Ö±½ÓÐ޸ĸ÷¶¨ÒåÖµ¡£´Ë¸ü¸ÄÔÚϵͳÖØÐÂÆô¶¯ºóÉúЧ¡£
2. ʹÓÃÃüÁîulimitÐÞ¸ÄĬÈÏÖµ¡£ÀýÈ磺
ulimit -f value
ulimit -c
ulimit -t
ulimit -d
ulimit -s
ulimit -m
ulimit -n
½«ÐÞ¸Äfsize, core, cpu,data, stack, rssºÍnofilesµÄsoft limitÖµ¡£
3. ʹÓÃÃüÁîchuserÐÞ¸ÄijÓû§µÄÏÞ¶¨Öµ¡£ÀýÈ磺
chuser fsize=
chuser core= chuser cpu=
chuser data=
chuser limit=
chuser rss=
chuser nofiles=
½«Óû§¡°username¡±µÄsoft limits¸ÄΪֵ¡°value¡±¡£
chuser hard_fsize=
chuser hard_core=
chuser hard_cpu=
chuser hard_data=
chuser hard_limit=
chuser hard_rss=
chuser hard_nofiles=
½«Óû§¡°username¡±µÄhard limits¸ÄΪֵ¡°value¡±¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ