Pages

Saturday, December 18, 2010

How to configure crash dump

When a fatal operating system occurred, the operating system will write some of the contents of physical memory to crash dump device. After writing process is done, the system reboot, contents of crash dump device will be saved to crash dump file. The crash dump file can be saved for future analysis to determine the cause of fatal error. You can use tips below to configure crash dump file.

  1. View current dump configuration. Crash dump file created will be saved on /var/crash/hostname
    root@solaris-sunray # dumpadm
    Dump content: kernel pages
    Dump device: /dev/dsk/c0d0s1 (swap)
    Savecore directory: /var/crash/solaris-sunray
    Savecore enabled: yes
  2. You can change dump device to a dedicated slice, not a swap slice. Dedicated device is required because we want to test generate a crash dump file.
    root@solaris-sunray # dumpadm -d /dev/dsk/c0d0s5
    root@solaris-sunray # dumpadm
    Dump content: kernel pages
    Dump device: /dev/dsk/c0d0s5 (dedicated)
    Savecore directory: /var/crash/solaris-sunray
    Savecore enabled: yes
  3. Generate crash dump.
    root@solaris-sunray # sync
    root@solaris-sunray # savecore -L
  4. See crash dump file generated
    root@solaris-sunray # ls /var/crash/solaris-sunray/
    bounds unix.0 vmcore.0
  5. Return to original dump configuration.
    root@solaris-sunray # dumpadm -d /dev/dsk/c0d0s1
    root@solaris-sunray # dumpadm
    Dump content: kernel pages
    Dump device: /dev/dsk/c0d0s1 (swap)
    Savecore directory: /var/crash/solaris-sunray
    Savecore enabled: yes

1 comment:

  1. Will there be a difference in the core file generated during a crash, if the dump device is a dedicated one instead of swap. Or is it required just for testing a core file generation.

    ReplyDelete