보통 Linux 에서는 Booting 시 Core File을 만들지 않도록 Setting 되어 있지만 설정을 바꾸려면 명령어를 사용해야 합니다.
1. Core Dump 확인 (ulimit –a)
2. Dump 용량 설정 (ulimit –c)
3. 항상 적용하기 (/etc/security/limits.conf)
위와 같은 명령으로 변경한 것은 해당 User만 변경되어 적용이 되며, reboot 후에는 다시 설정을 하여야 한다. 설정한 항목을 유지하기 위해 ‘/etc/security/limits.conf’를 아래의 형식으로 입력하면 된다.
| <domain> | <type> | <item> | <value> |
<domain> 해당 설정 값을 적용시킬 범위
- user name (userid) - 한 유저의 설정 변경
- group name (@groupid) - 한 그룹에 대한 설정 변경
- wildcard (*) - 모든 유저, 그룹에 대한 설정 변경
- wildcard (%) - * 와 동일, 단 maxlogins 변경에만 사용
<type>
- hard : superuser와 kernel에 의해 설정이 되게 하며, user는 설정된 값 이상으로 변경이 불가능하다.
- soft : soft로 설정한 값은 user가 얼마든지 설정 값을 변경 가능하다.
- - : hard와 soft 둘 다 설정
<item>
- core : limits the core file size (KB)
- data : maximum data size (KB)
- fsize : maximum filesize (KB)
- memlock : maximum locked-in-memory address space (KB)
- nofile : maximum number of open files
- rss : maximum resident set size (KB) (Ignored in Linux 2.4.30 and higher)
- stack : maximum stack size (KB)
- cpu : maximum CPU time (minutes)
- nproc : maximum number of processes
- as : address space limit
- maxlogins : maximum number of logins for this user
- maxsyslogins : maximum number of logins on system
- priority : the priority to run user process with (negative values boost process priority)
- locks : maximum locked files (Linux 2.4 and higher)
- sigpending : maximum number of pending signals (Linux 2.6 and higher)
- msqueue : maximum memory used by POSIX message queues (bytes) (Linux 2.6 and higher)
- nice : maximum nice priority allowed to raise to (Linux 2.6.12 and higher)
- rtprio : maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher)
예제) core dump file size를 변경
| astrix - core 1000 @group1 - core unlimited * - core 200000 |
이 설정을 하였는데도 불구하고, reboot 시 적용이 안된다면 ‘/etc/profile’을 살펴보자.
| … # No core files by default ulimit -S -c 0 > /dev/null 2>&1 … |
위의 빨간 부분을 주석 처리하여 reboot 하여 적용하면 된다.
'Operating System > Linux' 카테고리의 다른 글
| NTP (Network Time Protocol) 설정 (0) | 2010/10/20 |
|---|---|
| netdump 사용법 (0) | 2010/10/14 |
| dumpadm, coreadm 사용하기 (0) | 2010/10/12 |
| Ctrl+Alt+Del 사용하지 않는 법 (0) | 2010/10/09 |
| Linux Core Dump 확인하기 (0) | 2010/04/26 |
| Linux Console Command (File Management) (1) | 2008/07/17 |
| Web에서 Linux Server 관리하기 - Webmin (0) | 2007/11/16 |
| Linux Directory 구조 (0) | 2007/11/11 |
| SULinux로 손쉽게 서버를 구축하자 (0) | 2007/11/02 |
| Apache Tuning 정리 (0) | 2007/06/22 |
| Linux 2.4 Packet Filtering How-To (iptables와 ipchains의 차이점) (0) | 2007/06/22 |