[리눅스] kdump

리눅스-Linux 2014. 11. 7. 11:27

kdump는 kernel 패닉또는 crash가 발생했을 때 메모리 덤프를 생성하는 역할

kexec는 부팅 시 메모리에 상주하고 패닉발생시 현재 커널을 정지시키고 dump용 커널을 동작시킴


# yum install kexec-tools


kdump 설정 파일

# vi /etc/kdump.conf

#raw /dev/sda5

#ext4 /dev/sda3

#ext4 LABEL=/boot

#ext4 UUID=03138356-5e61-4ab3-b58e-27507ac41937

#net my.server.com:/export/tmp

#net user@my.server.com

path /var/crash

core_collector makedumpfile -c --message-level 1 -d 31

#core_collector scp

#core_collector cp --sparse=always

#extra_bins /bin/cp

#link_delay 60

#kdump_post /var/crash/scripts/kdump-post.sh

#extra_bins /usr/bin/lftp

#disk_timeout 30

#extra_modules gfs2

#options modulename options

#default shell

#debug_mem_level 0

#force_rebuild 1

#sshkey /root/.ssh/kdump_id_rsa

#fence_kdump_args -p 7410 -f auto -c 0 -i 10

#fence_kdump_nodes node1 node2


You can also set the amount of reserved memory to be variable, depending on the total amount of installed memory. The syntax is for variable memory reservation is crashkernel=<range1>:<size1>,<range2>:<size2>. For example:
crashkernel=512M-2G:64M,2G-:128M
The above example will reserve 64 MB of memory if the total amount of system memory is 512 MB or higher and lower than 2 GB. If the total amount of memory is more than 2 GB, 128 MB will be reserved for kdump instead.
On some systems, it might be necessary to reserve memory with a certain fixed offset. If the offset is set, the reserved memory will begin there. To offset the reserved memory, use the following syntax:
crashkernel=128M@16M
The example above means that kdump will reserve 128 MB of memory starting at 16 MB (physical address 0x01000000). If the offset parameter is set to 0 or omitted entirely, kdump will offset the reserved memory automatically. This syntax can also be used when setting a variable memory reservation as described above; in this case, the offset is always specified last (for example, crashkernel=512M-2G:64M,2G-:128M@16M).

NOTE: Kernel Dump를 생성하기 위해 메모리 공간을 예약

RHEL 5
crashkernel=128M@16M

RHEL 6 - Memory 2GB 이하
crashkernel=128M

RHEL 6 - Memory 2GB 이상
crashkernel=auto

128MB 기본 할당에 Memory 1TB에 64MB씩 추가됨 (절대 용량은 아님)
e.g.) DL980 G7에
 Memory 1TB > 192M
     DL980 G7에 Memory 4TB > 320M


nmi_watchdog=1

nmi_watchdog을 활성화
시스템이 일정시간 응답이 없는 경우 특정 Task를 구동하는 타이머

http://infoages.tistory.com/1327

'리눅스-Linux' 카테고리의 다른 글

[리눅스] 파일 무결성 검증  (1) 2014.11.18
[리눅스] parted  (0) 2014.11.18
[리눅스] nohup  (0) 2014.10.31
[리눅스] fuser  (0) 2014.05.22
[Linux] automount  (0) 2014.05.20
Posted by 뭉탁거림
,