/etc/security/limits.conf 수정하는 방법 (open파일겟수 증가)
최근에 open 파일 겟수가 1024로 되어 있어 해당하는 값을 변경해 달라는 요청이 있어 수작업으로 진행했다.
ulimit -Sa 명령어를 이용하면 치면 아래와 같은 값이 출력되었는데 이 값을 8192로 변경해 달라는 요청이였다.
open files (-n) 1024
이에 아래와 같이 /etc/security/limits.conf 를 수정했다. (root로 수정해야 하며, rebooting 이 필요 없음)
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<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
#
#<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
weblogic soft nofile 8192
weblogic hard nofile 8192
"limits.conf" 52L, 1856C written
이렇게 수정할 경우 weblogic 계정에서 사용하는 open file의 갯수가 8192로 변경될 수 있도록 해주었고, 다만 hard 설정보다 soft 설정이 커질수는 없으므로 동일하게 맞추어 주는 것이 편리하다. (관리상의 이점정도)
[root@gw2 security]# su - weblogic
[weblogic@w2 ~]$
[weblogic@w2 ~]$
[weblogic@w2 ~]$
[weblogic@w2 ~]$
[weblogic@w2 ~]$ ulimit -Sa
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 268288
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 8192
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 268288
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[weblogic@w2 ~]$
weblogic 계정에서 변경된 것을 볼 수 있다.
제목 | 날짜 | ||
---|---|---|---|
419 | MP3 다운로드 검색 프로그램 cjuke | 4896 | 2008/11/27 |
418 | 무료 mp3 다운 개소리 | 4995 | 2008/11/27 |
417 | RSS 만들기 | 10133 | 2008/11/30 |
416 | embed 제어창만 보이게 하기 | 4436 | 2008/12/02 |
415 | e-book 무료로 보기 (경기도 사이버 도서관) [1] | 5252 | 2008/12/03 |
414 | 무료 웹하드 | 4249 | 2008/12/07 |
413 | [X61] 뱅킹에서 빨콩 날아다니는 증상 [1] | 9485 | 2008/12/10 |
412 | AI Roboform | 3399 | 2008/12/10 |
411 | 동영상 변환하기 | 3876 | 2008/12/17 |
410 | 오픈아이디 관련글 | 3549 | 2008/12/23 |
409 | 파란닷컴 무료문자 쿠폰 번호 공유 - 250건 [1] | 5265 | 2008/12/25 |
408 | 아이콘 자료실 | 4128 | 2008/12/25 |