System Administration Guide, Volume 2

Managing System Crash Information Task Map

Table 39-1 Managing System Crash Information Task Map

Task 

Description 

For Instructions, Go To 

1. Display the Current Crash Dump Configuration 

Display the current crash dump configuration by using the dumpadmcommand.

"How to Display the Current Crash Dump Configuration"

2. Modify the Crash Dump Configuration 

Use the dumpadm command to specify the type of data to dump, whether or not the system will use a dedicated dump device, the directory for saving crash dump files, and the amount of space that must remain available after crash dump files are written.

"How to Modify a Crash Dump Configuration"

3. Examine a Crash Dump File 

Use the crash command to view crash dump files.

"How to Examine a Crash Dump"

4. Recover From a Full Crash Dump Directory 

Optional. The system crashes but there is no room in the savecore directory, and you want to save some critical system crash dump information.

"How to Recover From a Full Crash Dump Directory (Optional)"

4. Disable or Enable the Saving of Crash Dump Files 

Optional. Use the dumpadm command to disable or enable the saving the crash dump files. Saving crash dump files is enabled by default.

"How to Disable or Enable Saving Crash Dumps (Optional)"

How to Display the Current Crash Dump Configuration

  1. Become superuser.

  2. Display the current crash dump configuration by using the dumpadm command without any options.


    # dumpadm
          Dump content: kernel pages
           Dump device: /dev/dsk/c0t3d0s1 (swap)
    Savecore directory: /var/pluto
      Savecore enabled: yes

    The above example output means:

    • The dump content is kernel memory pages.

    • Kernel memory will be dumped on a swap device, /dev/dsk/c0t3d0s1. You can identify all your swap areas with the swap -l command.

    • System crash dump files will be written in the /var/crash/venus directory.

    • Saving crash dump files is enabled.

How to Modify a Crash Dump Configuration

  1. Become superuser.

  2. Identify the current crash dump configuration by using the dumpadm command.


    # dumpadm
          Dump content: kernel pages
           Dump device: /dev/dsk/c0t3d0s1 (swap)
    Savecore directory: /var/crash/pluto
      Savecore enabled: yes

    This the default dump configuration for a system running the Solaris 8 release.

  3. Modify the crash dump configuration by using the dumpadm command.


    # dumpadm -c content -d dump-device -m nnnk | nnnm | nnn% -n -s savecore-dir
    

    -c content

    Specifies the type of data to dump: kernel memory or all of memory. The default dump content is kernel memory. 

    -d dump-device

    Specifies the device that stores dump data temporarily as the system crashes. The primary swap device is the default dump device.  

    -m nnnk | nnnm | nnn%

    Specifies the minimum free disk space for saving crash dump files by creating a minfree file in the current savecore directory. This parameter can be specified in kilobytes (nnnk) , megabytes (nnnm) or file system size percentage (nnn%). The savecore command consults this file prior to writing the crash dump files. If writing the crash dump files, based on their size, would decrease the amount of free space below the minfree threshold, the dump files are not written and an error message is logged. See "How to Recover From a Full Crash Dump Directory (Optional)" for recovering from this scenario.

    -n

    Specifies that savecore should not be run when the system reboots. This dump configuration is not recommended. If system crash information is written to the swap device, and savecore is not enabled, the crash dump information is overwritten when the system begins to swap.

    -s

    Specifies an alternate directory for storing crash dump files. The default directory is /var/crash/hostname where hostname is the output of the uname -n command.

Example--Modifying a Crash Dump Configuration

In this example, all of memory is dumped to the dedicated dump device, /dev/dsk/c0t1d0s1, and the minimum free space that must be available after the crash dump files are saved is 10% of the file system space.


# dumpadm
      Dump content: kernel pages
       Dump device: /dev/dsk/c0t3d0s1 (swap)
Savecore directory: /var/crash/pluto
  Savecore enabled: yes
 # dumpadm -c all -d /dev/dsk/c0t1d0s1 -m 10%
      Dump content: all pages
       Dump device: /dev/dsk/c0t1d0s1 (dedicated)
Savecore directory: /var/crash/pluto (minfree = 77071KB)
  Savecore enabled: yes

How to Examine a Crash Dump

  1. Become superuser.

  2. Examine a crash dump by using the crash utility.


    # /usr/sbin/crash [-d crashdump-file] [-n name-list] [-w output-file]

    -d crashdump-file

    Specifies a file to contain the system memory image. The default crash dump file is /dev/mem.

    -n name-list

    Specifies a text file to contain symbol table information if you want to examine symbolic access to the system memory image. The default file name is /dev/ksyms.

    -w output-file

    Specifies a file to contain output from a crash session. The default is standard output. 

  3. Display crash status information.


    # /usr/sbin/crash
    dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
    > status
       .
       .
       .
    > size buf proc queue
       .
       .
       .

Example--Examining a Crash Dump

The following example shows sample output from the crash utility. Information about status, and about the buffer, process, and queue size is displayed.


# /usr/sbin/crash
dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> status
system name:	SunOS
release:	5.8
node name:	earth
version:	s28_25
machine name:	sun4m
time of crash:	Wed Jun 30 16:02:31 1999
age of system:	18 min.
panicstr:	
panic registers:
	pc: 0      sp: 0
> size buf proc queue
120
1808
96

How to Recover From a Full Crash Dump Directory (Optional)

In this scenario, the system crashes but there is no room in the savecore directory, and you want to save some critical system crash dump information.

  1. Log in as superuser after the system reboots.

  2. Clear out the savecore directory, usually /var/crash/hostname, by removing existing crash dump files that have already been sent to your service provider. Or, run the savecore command and specify an alternate directory that has sufficient disk space. (See the next step.)

  3. Manually run the savecore command and if necessary, specify an alternate savecore directory.


    # savecore [ directory ]

How to Disable or Enable Saving Crash Dumps (Optional)

  1. Become superuser.

  2. Disable or enable the saving of crash dumps on your system by using the dumpadm command.

Example--Disabling the Saving of Crash Dumps

This example illustrates how to disable the saving of crash dumps on your system.


# dumpadm -n
      Dump content: all pages
       Dump device: /dev/dsk/c0t1d0s1 (dedicated)
Savecore directory: /var/crash/pluto (minfree = 77071KB)
  Savecore enabled: no

Example--Enabling the Saving of Crash Dumps

This example illustrates how to enable the saving of crash dump on your system.


# dumpadm -y
      Dump content: all pages
       Dump device: /dev/dsk/c0t1d0s1 (dedicated)
Savecore directory: /var/crash/pluto (minfree = 77071KB)
  Savecore enabled: yes