ulimit »ç¿ë¹ý (±Û À±¿µÇÑ) | ÀÛ¼ºÀÏ : 2003/12/11 01:34 |
Á¶È¸¼ö : 17484 |
ÇöÀç´Â http://chongnux.klug.or.kr ÀÌ ¾Æ´Ñ http://chongnux.ilinuxbay.com/ (û´ª½º) _____________________________________________________________________ ÀÛ¼ºÀÚ : À±¿µÇÑ (shee@chongnux.klug.or.kr) ȨÆäÀÌÁö : http://chongnux.klug.or.kr _____________________________________________________________________ [ RedHat 7.2 ] - Çѵµ¿¡´Â µÎ°¡Áö Á¾·ù°¡ ÀÖ´Ù, ¼ÒÇÁÆ® Çѵµ´Â »õ·Î¿î ÇÁ·Î±×·¥ÀÌ »ý¼ºµÇ¸é µðÆúÆ®·Î Àû¿ëµÇ´Â ÇѵµÀÌ´Ù. Çϵå Çѵµ´Â ¼ÒÇÁÆ® Çѵµ¿¡¼ ÃÖ´ë ´Ã¸±¼ö ÀÖ´Â Çѵµ ÀÌ´Ù. Çϵå Çѵµ´Â ½´ÆÛÀ¯Àú¿¡ ÀÇÇؼ¸¸ Á¶Á¤ÀÌ °¡´ÉÇÏÁö¸¸ ¹«ÇÑÈ÷ ´Ã¸±¼ö ÀÖ´Â °ÍÀº ¾Æ´Ï´Ù. ¸¸¾à °íÄ¥·Á¸é Ä¿³Î¿¡¼ ÀÌ °ªÀ» Á¶Á¤ÇØ¾ß ÇÑ´Ù. ±âº» ¼³Á¤Àº /etc/profile¿¡¼ ulimit°¡ ¾Æ´Ñ ´Ù¸¥ ¹æ¹ýÀº /etc/security/limit.conf ÈÀÏÀ» ÀÌ¿ëÇÏ´Â °Íµµ ÁÁÀº ¹æ¹ýÀÌ´Ù. * ¼ÒÇÁÆ® Çѵµ [root@vm_master etc]# ulimit -Sa core file size (blocks) 0 # ÄÚ¾îÆÄÀÏÀÇ ÃÖ´ëÅ©±â data seg size (kbytes) unlimited # ÇÁ·Î¼¼½ºÀÇ µ¥ÀÌŸ ¼¼±×¸ÕÆ® ÃÖ´ëÅ©±â file size (blocks) unlimited # ½©¿¡¼ »ý¼ºµÇ´Â ÆÄÀÏÀÏ ÃÖ´ëÅ©±â max locked memory (kbytes) unlimited max memory size (kbytes) unlimited # resident set sizeÀÇ ÃÖ´ëÅ©±â(¸Þ¸ð¸® ÃÖ´ëÅ© ±â) open files 1024 # open file descriptorsÀÇ ÃÖ´ë ¼ýÀÚ(¿¼öÀÖ ´Â ÃÖ´ëÆÄÀϼö) # ÇϳªÀÇ ÇÁ·Î ¼¼½º´ç ÃÖ´ë ¿¼ö ÀÖ´Â ÈÀÏÀÇ °³¼ö pipe size (512 bytes) 8 # 512-¹ÙÀÌÆ® ºí¶ôÀÇ ÆÄÀÌÇÁ Å©±â stack size (kbytes) 8192 # ÇÁ·Î¼¼½ºÀÇ ½ºÅà ÃÖ´ëÅ©±â cpu time (seconds) unlimited # ÃÑ ´©ÀûµÈ CPU½Ã°£(ÃÊ) max user processes 1024 # ´ÜÀÏ À¯Àú°¡ »ç¿ë°¡´ÉÇÑ ÇÁ·Î¼¼½ºÀÇ ÃÖ´ë°¹¼ö # virtual memory (kbytes) unlimited # ½©¿¡¼ »ç¿ë°¡´ÉÇÑ °¡»ó ¸Þ¸ð¸®ÀÇ ÃÖ´ë¿ë·® *Çϵå Çѵµ [root@vm_master etc]# ulimit -Ha core file size (blocks) unlimited data seg size (kbytes) unlimited file size (blocks) unlimited max locked memory (kbytes) unlimited max memory size (kbytes) unlimited open files 1024 pipe size (512 bytes) 8 stack size (kbytes) unlimited cpu time (seconds) unlimited max user processes 1024 virtual memory (kbytes) unlimited [»ç¿ë ¹æ¹ý] ulimit [¿É¼Ç] °ª -a: ¸ðµç Á¦ÇÑ »çÇ×À» º¸¿©ÁØ´Ù. -c: ÃÖ´ë ÄÚ¾î ÆÄÀÏ »çÀÌÁî -d: ÇÁ·Î¼¼½º µ¥ÀÌÅÍ ¼¼±×¸ÕÆ®ÀÇ ÃÖ´ë Å©±â -f: shell¿¡ ÀÇÇØ ¸¸µé¾îÁú ¼ö ÀÖ´Â ÆÄÀÏÀÇ ÃÖ´ë Å©±â -s: ÃÖ´ë ½ºÅà ũ±â -p: ÆÄÀÌÇÁ Å©±â -n: ¿ÀÇ ÆÄÀÏÀÇ ÃÖ´ë¼ö -u: ÇÁ·Î¼¼½º ÃÖ´ë¼ö -v: ÃÖ´ë °¡»ó¸Þ¸ð¸®ÀÇ ·® [ ulimit & Ä¿³Î ¼Ò½º Çì´õ ºÐ¼® ] [ /usr/src/linux-2.4.17/include/linux/fs.h ] /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change * the file limit at runtime and only root can increase the per-process * nr_file rlimit, so it's safe to set up a ridiculously high absolute * upper limit on files-per-process. * * Some programs (notably those using select()) may have to be * recompiled to take full advantage of the new limits.. */ /* Fixed constants first: */ /* ÇÑ ÇÁ·Î¼¼½º´ç ÈÀÏ ¼öÀÇ Àý´ë ÇÑ°èÁ¡ */ #define NR_OPEN (1024*1024) /* Absolute upper limit on fd num */ /* ÇÑ À¯Àú°¡ ¿ ¼ö ÀÖ´Â ÃÖ´ë ÈÀϼö */ #define INR_OPEN 1024 /* Initial setting for nfile rlimits */ /* ½Ã½ºÅÛ¿¡¼ µ¿½Ã¿¡ ¿¼ö ÀÖ´Â ÃÖ´ë ÈÀϼö */ #define NR_FILE 8192 /* this can well be larger on a larger system */ /* /proc/sys/fs/file_max file-nr °ª°ú °°´Ù. [root@vm_master fs]# cat file-max 8192 [root@vm_master fs]# cat file-nr 298 50 8192 ÇöÀç ÇÒ´çµÇ ÈÀÏ ÇÚµé¼ö ÇöÀç ÇÒ´çµÈ ÈÀÏ ÇÚµéÁß »ç¿ëÁßÀÌ ÇÚµé¼ö ÃÖ´ë »ç¿ë ÇÒ ¼ö ÀÖ´Â ÈÀÏ ÇÚµé¼ö [ /usr/src/linux-2.4.17/Documentation/filesystems/proc.txt ] [ /usr/src/linux-2.4.17/include/linux/limit.h ] #ifndef _LINUX_LIMITS_H #define _LINUX_LIMITS_H #define NR_OPEN 1024 # ÇÑ ÇÁ·Î¼¼½º´ç ¿¼ö ÀÖ´Â ÆÄÀϼö #define NGROUPS_MAX 32 /* supplemental group IDs are available */ #define ARG_MAX 131072 /* # bytes of args + environ for exec () */ #define CHILD_MAX 999 /* no limit :-) */ #define OPEN_MAX 256 /* # open files a process may have */ #define LINK_MAX 127 /* # links a file may have */ #define MAX_CANON 255 /* size of the canonical input queue */ #define MAX_INPUT 255 /* size of the type-ahead buffer */ #define NAME_MAX 255 /* # chars in a file name */ #define PATH_MAX 4095 /* # chars in a path name */ #define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ #define RTSIG_MAX 32 #endif |
Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ / URL : http://coffeenix.net/board_view.php?bd_code=146 |