Chinaunix首页 | 论坛 | 博客
  • 博客访问: 330864
  • 博文数量: 88
  • 博客积分: 3020
  • 博客等级: 中校
  • 技术积分: 930
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-13 09:32
文章分类

全部博文(88)

文章存档

2011年(1)

2009年(87)

我的朋友

分类: LINUX

2009-05-21 09:10:07

How do I use the diskdump utility to capture a vmcore in Red Hat Enterprise Linux 3 and 4?

Release found: Red Hat Enterprise Linux 3 and Red Hat Enterprise Linux 4  

Note: Red Hat Enterprise Linux 5 uses kdump instead of diskdump. See  

Introduction:

 

The diskdump utility offers the ability to create and collect vmcore (Kernel dumps) on a single system without needing to be connected to a network. Diskdump creates files in an identical format to the netdump core files and can be analyzed with the same tools. Like netdump, diskdump will only work with certain hardware.

 

Supported cards should be listed in the README file in the /usr/share/doc/diskdumputils-* directory. Diskdump is only available in Red Hat Enterprise Linux 3 Update 3 and above.

 

How it works:

 

A diskdump is created in a two stage process and works similarly to UNIX-style traditional disk dumps. The first step is when the kernel itself crashes and the current memory, the CPU state and related information are saved to a reserved partition on a supported disk.

 

On the next reboot, when the system restarts the diskdump init scripts will create a vmcore file from the saved information on the reserved partition. This file will be recreated in the directory /var/crash/ with the name 127.0.0.1-

.

 

Diskdump can be used at the same time as netdump and must be configured separately. Diskdump will take priority over a netdump, unless an IO error occurs in which case it will fall back to netdump.

 

Configuring diskdump

 

·         These steps assume that the diskdumputils package is installed. If not, install it using up2date:

 
 up2date diskdumputils
 

 

·         To configure diskdump, load the diskdump module.

 
 # modprobe diskdump
 

 

·         Check that the module is loaded, the output of the command should look similar to the output below.

 
 # dmesg | tail
 header blocks: 3
 bitmap blocks: 8
 total number of memory blocks: 261999
 total blocks written: 262010
 

 

·         The diskdump daemons reserved partition can be specified in the /etc/sysconfig/diskdump. The file to specify which partition.

 
 DEVICE=/dev/sde1
 

 

·         Next step is to initialize the partition for use

WARNING, ANY DATA ON IT WILL BE LOST.

 
 # service diskdump initialformat
 

 

·         And finally, add the service to run on startup and then start the service.

 
 # chkconfig diskdump on
 # service diskdump start
 

 

 

After setting up the diskdump add the following command to save the diskdump image into /var/crash folder, put it in /etc/rc.local so that when the system crashes and reboots it will automatically run the command.

 

 
 
savecore -v /dev/
 

 

The diskdump service is now configured. At the next system crash, the data should be saved to the specified partition. This may take some time if the system has large amounts of RAM.

 

阅读(2141) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~