1. C3 각 장비 SSH 접속 후 Openfile 수량 확인 [ 하드웨어 / 소프트웨어]
* OS에 외부 접속이 발생할 경우 기본적으로 FILE을 Open하는 수량이 제한
되어 있습니다. 하드웨어 / 소프트웨어 분류 됩니다.
2. 확인 방법
하드웨어 : ulimit -Hn
[root@]# ulimit -Hn
4096
소프트웨어 : ulimit -Sn
[root@]# ulimit -Sn
1024
3. 시스템 최대 허용 수량 확인
#cat /proc/sys/fs/file-max
26255274
4. File 수량 증가
#vi /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - a 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 file descriptors
# - 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 (KB)
# - 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 values: [-20, 19]
# - 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
# End of file
root hard nofile 100000 => 해당 라인 추가
root soft nofile 100000 => 해당 라인 추가
5. 시스템 리부팅
하드웨어 : ulimit -Hn
[root@]# ulimit -Hn
100000
소프트웨어 : ulimit -Sn
[root@]# ulimit -Sn
100000
*) 변경 사항 반듯이 확인 필요
6. 리부팅 없이 적용 방법
# primit 명령어를 통해서 적용 방법이 있지만 CentOS or RedHat 계열
Enterprise 7.0 이상 지원 되는것으로 파악..
7. 관련 자료는 다음과 같습니다.
https://medium.com/hbsmith/too-many-open-files-%EC%97%90%EB%9F%AC-
%EB%8C%80%EC%9D%91%EB%B2%95-9b388aea4d4e
'리눅스' 카테고리의 다른 글
ssh 접속시 인증 없애기 (0) | 2018.11.09 |
---|---|
리눅스 부팅오류 ‘Give root password for maintenance (or type Control-D to continue)’ (0) | 2018.11.09 |
서울 시간 동기화 (0) | 2018.11.09 |
Find 명령어를 이용하여 문자열 찾기 (0) | 2018.11.09 |
서브넷 마스크 (subnetmask) (0) | 2018.11.09 |