Go to main content

Troubleshooting System Administration Issues in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017
 
 

Configuring Your System for Crash Dumps

This section describes the tasks for managing crash dump procedures for your system.

Displaying the Current Crash Dump Configuration

To display the current crash dump configuration, assume the root role and issue the dumpadm command with no arguments.

# dumpadm
 Dump content: kernel with ZFS metadata
       Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
  Savecore enabled: yes
   Save compressed: on

    This example output shows the following configuration:

  • The dump content is kernel memory pages with ZFS metadata.

  • Kernel memory will either be held in memory until a reboot or dumped on a dedicated dump device, /dev/zvol/dsk/rpool/dump.

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

  • Saving crash dump files is enabled.

  • Crash dump files are saved in compressed format.

Modifying the Configuration for Crash Dumps

To modify the crash dump configuration, assume the root role and use the dumpadm command.

The syntax for the dumpadm command is as follows:

#  /usr/sbin/dumpadm [-enpuy] [-c content-type] [-d dump-device] [-m mink | minm | min%]
[-s savecore-dir] [-r root-dir] [-z on | off]
–c content-type

Specifies the type of data to dump. The possible values are as follows:

  • kernel which dumps the kernel memory pages only

  • all which dumps all memory pages

  • curproc which dumps kernel memory and the memory pages of the process whose thread was executing when the crash occurred

  • allproc which dumps kernel memory pages and all process pages

  • zfs which dumps kernel pages that store ZFS metadata

The default dump content is kernel memory with ZFS metadata. For example:

# dumpadm -c kernel
# dumpadm -c +zfs
# dumpadm -c -zfs
# dumpadm -c curproc+zfs
–d dump-device

Specifies the device that stores dump data temporarily when the system crashes. The primary dump device is the default dump device. When the dump device is not the swap area, savecore runs in the background, which speeds up the boot process.


Note -  A deferred dump will store dump data in RAM temporarily instead of using a dump device. However, you should specify a dump device in case the deferred dump fails, cannot be performed, or the savecore directory does not have enough space to write the crash dump files directly into the file system.
–e

Prints an estimate of disk space required for storing a compressed crash dump. The value is computed using the current configuration and currently running system.

–m mink | minm | min%

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 KB (mink), MB (minm) or file system size percentage (min%). If no minimum free space has been configured, the default is 1MB.

The savecore command consults this file prior to writing the crash dump files. If writing the crash dump files would decrease the amount of free space below the minfree threshold due to their size, the dump files are not written and an error message is logged. For information about recovering from this scenario, see Saving Data When the Crash Dump Directory Is Full.

–n

Specifies that savecore will not be run automatically when the system reboots. This dump configuration is not recommended because the system will attempt to preserve a crash dump image in memory.

–p

Produces machine-readable output.

–s savecore-dir

Specifies an alternate directory for storing crash dump files. In Oracle Solaris 11, the default directory is /var/crash.

–u

Forcibly updates the kernel dump configuration based on the contents of the /etc/dumpadm.conf file.

–y

Modifies the dump configuration to automatically execute the savecore command upon reboot, which is the default for this dump setting.

–z on | off

Modifies the dump configuration to control the operation of the savecore command upon reboot. The on setting enables the saving of a core file in a compressed format. The off setting automatically uncompresses the crash dump file. Because crash dump files can be extremely large and therefore require less file system space if they are saved in a compressed format, the default is on.

Example 1  Modifying a Crash Dump Configuration

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

# dumpadm
      Dump content: kernel with ZFS metadata
       Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
  Savecore enabled: yes
   Save compressed: on

# dumpadm -c all -d /dev/zvol/dsk/rpool/dump -m 10%
       Dump content: all pages
       Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash (minfree = 5935131KB)
  Savecore enabled: yes
   Save compressed: on

# dumpadm -n
       Dump content: all pages
       Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash (minfree = 5935131KB)
  Savecore enabled: no          
   Save compressed: on

# dumpadm -y
       Dump content: all pages
       Dump device: /dev/zvol/dsk/rpool/dump(dedicated)             
Savecore directory: /var/crash (minfree = 5935131KB)
      Savecore enabled: yes         
        Save compressed: on
Example 2  Disabling the Saving of Crash Dumps

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

# dumpadm -n
       Dump content: all pages
       Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash (minfree = 5697105KB)
  Savecore enabled: no
   Save compressed: on

Caution

Caution  -  Oracle Solaris strongly recommends that you do not disable the saving of crash dumps. Crash dumps provide an invaluable way to determine what causes your system to crash.


Example 3  Enabling the Saving of Crash Dumps

This example shows how to enable the saving of crash dumps on your system.

# dumpadm -y
      Dump content: all pages
      Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash (minfree = 5697105KB)
  Savecore enabled: yes
   Save compressed: on