작성자: 주인장 디지문
(http://www.digimoon.net/)
특정 계정의 ulimit 값을 변경/고정시키는
방법은 아래와 같습니다.
1. 현재의 일반 계정 세션에서 빠져 나온다.
2. Root로 로그인하여 /etc/security/limits.conf 파일을 편집기로 열어 아래 행을 추가해 준다(source라는 계정명에 적용할 때).
#<domain> <type> <item> <value> #
#* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 source - nproc unlimited |
3. max number of
processes 값을 변경/고정시키려면 <item>
행을 nproc로 저장하면 됩니다.
/etc/security/limits.conf 의 아래 내용 부분 참고하면 됩니다.
#<item> can be one of the following: # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open files # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to # - rtprio - max realtime priority |
4. 이제 일반 계정으로 로그인하여 ulimit –a로 확인하면 원하는 값으로 변경되어 있는 것을 확인할 수 있습니다.