Go to main content

Troubleshooting System Administration Issues in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Configuring Your System for Crash Dumps

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

For more information about managing system crash dump, see dumpadm(8) man page.

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. Depending on the kernel memory and other internal information, the dumpadm command establishes a dump device to accommodate a dump file. The size of the dump device should be big enough to store the dump file, otherwise dumpadm displays an error message and the operation fails. For more information about managing the configuration of crash dumps using dumpadm, see the dumpadm(8) man page.

Example 1  Modifying a Crash Dump Configuration

In this example, all memory is dumped to the dedicated dump device, /dev/zvol/dsk/rpool/dump. 10% of the file system space must be available as minimum 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  -  Do not disable the saving of crash dumps. Crash dumps provide a 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

Comparison of Different Dump Devices

The following table describes the differences between various dump devices. Note these differences when you set up a dump device.

Table 1  Comparison of Different Dump Devices
Features
swap
zvol
none
Size
Size of the dump device is proportional to the size of physical memory. It also depends on the settings of the dumpadm command and the dump content. You can use the –e option of the dumpadm command to get an estimate of the space required.
Size of the dump device is proportional to the size of physical memory. It also depends on the settings of the dumpadm command and the dump content. You can use the –e option of the dumpadm command to get an estimate of the space required.
Not applicable.
Resizing capability
You cannot resize the dump device easily.
Not applicable.
Minimum free space required
You need sufficient space in the crash directory and on the volume which will store the dump data.
You need sufficient space in the crash directory and on the volume which will store the dump data.
You need sufficient space in the crash directory.
Risk factors
The crash dump can be overwritten by swapping activity.
If the physical memory of the system is upgraded without resizing the zvol, then the dump device can be too small to hold the dump data in case of a system panic.
If the deferred dump is inactive, then crash dump will not be captured in case of a panic. Deferred dump can be inactive if your system has low installed physical memory or if the firmware does not support it.

Note -  A ZFS based device cannot be used as a dump device.

The estimate provided by the dumpadm -e command depends on the currently running system and dump configuration. Therefore, you should run this command once your system is properly warmed up and the final dump configuration is in place. Otherwise the estimate might be wrong by a large margin.

For more information about the none dump device and the nodump attribute, see the ai_manifest(5) man page.