각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
첨부파일 https://imweb.eond.com/webtip/380554

/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 계정에서 변경된 것을 볼 수 있다.

코멘트 0
접기/펴기 | 댓글 새로고침
 
 
Total 683 articles in 4 / 57 pages
번호 제목 제목 조회 수 날짜날짜
647 [텔넷] [추천]SSH 파일 관리 명령어 - 폴더,파일의 삭제 및 압축/해제 [4] 56725 2007/03/30
646 [브라우저] 파이어폭스 Alt+S 사용하기 12509 2007/03/31
645 [기타] 폰트 설치하기 파일 9375 2007/04/16
644 [웹로그] 유니클락 블로그에 삽입하기 9422 2007/07/29
643 [미디어/녹음·재생] miniwiniFlashMusicbox 7413 2007/08/24
642 [미디어/녹음·재생] Imeem.com 과 같은 음악갤러리 사이트... esnips (by 장화신은고양이) 8674 2007/08/24
641 [백신/악성코드/보안] Windows 보안업데이트 솔루션, PCSmile 파일 9334 2007/08/26
640 [미디어/녹음·재생] flv 다운받기 (동영상 다운받기) [1] 14345 2007/08/26
639 [기타] 컴퓨터 두대로 iTunes 음악 공유하기 (by 김동범) 13049 2007/08/31
638 [기타] 블로그에 북로그 달기 파일 9407 2007/09/01
637 [생활] 운동화끈 안 풀리는 법 9972 2007/09/02
636 [기타] 국내외 뉴스를 한눈에 보자 (뉴스바다) 9149 2007/09/02

해시태그 디렉터리