Subject : C Shell¿¡¼ÀÇ System Resource Á¦ÇÑ Description : limit Command´Â Shell CommandÀ̱⠶§¹®¿¡ Shell¸¶´Ù ¿ë¹ýÀÌ Æ²¸± ¼ö ÀÖ´Ù. ¿©±â¼´Â csh¿¡ ´ëÇؼ¸¸ ¾Ë¾Æº¸°Ú´Ù. Shell ¶Ç´Â Process¿¡ ´ëÇØ system resource¸¦ Á¦ÇÑÇÒ ¼ö ÀÖ´Ù. ¿¹¸¦ µé¸é Process´ç ÃÖ´ë Cpu Time(cputime), OpenµÇ´Â fileÀÇ ÃÖ´ë Size(filesize), data size ¶Ç´Â heap size(datasize), stack size(stacksize), coredumpsize, ÇÑ process°¡ µ¿½Ã¿¡ OpenÇÒ ¼ö ÀÖ´Â file¼ö(descripters), virtual memory size(memorysize)µîÀÌ ÀÖ´Ù. ProgramÀ» ¼öÇàÇÏ´Ùº¸¸é À§¿Í°°Àº ResourceÀÇ Á¦ÇÑÀÇ Å©±â¸¦ Á¶Á¤ÇÒ ¼ö ÀÖ´Ù. Á¦ÇÑÇÏ´Â ¹æ¹ýÀº limit command¿¡ ÀÇÇÑ ¹æ¹ý°ú system parameter¿¡ ÀÇÇÑ ¹æ¹ýÀÌ ÀÖ´Ù. ¸ÕÀú limit Command¿¡ ´ëÇØ ¾Ë¾Æ º¸ÀÚ. optionÀ» ÁÖÁö ¾ÊÀ¸¸é soft limit, -h optionÀ» ÁÖ¸é hard limitÀÌ´Ù. soft limit´Â hard limit ¹üÀ§¸¦ ÃÊ°úÇÒ ¼ö ¾ø´Ù. hard limit´Â super user¿¡¼ ¸¸ÀÌ Çã¿ëµÈ´Ù. # limit [-h] <== ÇöÀçÀÇ limit °ªÀ» º¸¼ö ÀÖ´Ù. # limit [-h] descriptors 128 <== descripter limit °ª º¯°æ # unlimit [-h] descripter <== ÇöÀç limit °ªÀ» ÇØÁ¦, Áï ¹«Á¦ÇÑÀÌ µÈ´Ù. limit´Â ÇöÀçÀÇ Shell°ú ±×°ÍÀÇ Child process¿¡ Àü½ÂµÈ´Ù. ´ÙÀ½Àº ¿¹¸¦µé¾î system parameter¿¡ ÀÇÇؼ file descripter limit¸¦ ¼öÁ¤ÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æº¸°Ú´Ù. rlim_fd_max=0x90 descripter hard limit rlim_fd_cur=0x80(128) descripter soft limit ´ÙÀ½Àº /etc/default/login file¿¡¼ filesize¸¦ Á¦ÇÑÇÏ´Â ¹æ¹ýÀÌ ÀÖ´Ù. # vi /etc/default/login ... # ULIMIT sets the file size limit for the login. Units are disk blocks. # The default of zero means no limit. # #ULIMIT=0 ... ÀÌ»ó program resource limit¿¡ ´ëÇØ ¾Ë¾Æº¸¾Ò´Ù. ±×·¯³ª ¿©±â¼ ÁÖÀÇÇÒÁ¡Àº °¢ resourceº°·Î ¹«ÇÑÁ¤ Á¦ÇÑÇÒ ¼ö ¾ø´Ù´Â Á¡ÀÌ´Ù. ¿¹¸¦ µé¸é descripter´Â 1024, datasize ¶Ç´Â stacksize´Â 2gigaµîÀÌ Á¦ÇÑÀÌ´Ù. ´ÙÀ½ "lmh036"¿¡¼ ProgramÀ¸·Î limit¸¦ ÁÙ¼ö ÀÖ´Â ¹æ¹ýÀ» ±â¼úÇÏ°Ú´Ù. Revision History ÀÛ¼ºÀÏÀÚ : 96.11.13 ÀÛ¼ºÀÚ : À̹ÎÈ£ ¼öÁ¤ÀÏÀÚ : ¼öÁ¤ÀÚ :