Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1283431
  • 博文数量: 554
  • 博客积分: 10425
  • 博客等级: 上将
  • 技术积分: 7555
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-09 09:49
文章分类

全部博文(554)

文章存档

2012年(1)

2011年(1)

2009年(8)

2008年(544)

分类:

2008-04-07 18:01:39

默认的,系统是用swap分区做dump设备的,系统panic或者reboot -d后,在系统重启时利用swap分区来保存dump的内容。

而savecore -L是live dump,swap分区作为内存的一部分被dump出来,所以,用-L参数是不能使用swap做dump device的。

# dumpadm
     Dump content: kernel pages
      Dump device: /dev/dsk/c0d0s1 (swap)
 Savecore directory: /var/crash/boltx-2
 Savecore enabled: yes


因此,首先要有一个空闲的设备或者文件,然后用dumpadm设置这个设备或者文件为dedicated的dump设备,关于dumpadm请看手册man dumpadmin(1M):

# mkfile 1g /export/home/dump
# dumpadm -d /export/home/dump
     Dump content: kernel pages
      Dump device: /export/home/dump (dedicated)
 Savecore directory: /var/crash/boltx-2
 Savecore enabled: yes

然后,再运行savecore:

# savecore -v -L
dumping to /export/home/dump, offset 65536, content: kernel
100% done: 41184 pages dumped, compression ratio 2.97, dump succeeded
System dump time: Tue Jul 25 18:10:27 2006
Jul 25 18:10:31 unknown savecore: saving system crash dump in /var/crash/boltx-2/*.1
Constructing namelist /var/crash/boltx-2/unix.1
Constructing corefile /var/crash/boltx-2/vmcore.1
100% done: 41184 of 41184 pages saved
阅读(543) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~