Previous Page
Next Page

Crash Dump Configuration

Objective:

Manage crash dumps and core file behaviors.

When a serious error is encountered, the system displays an error message on the console, dumps the entire contents of physical memory to the disk, and then reboots the system. A crash dump is a snapshot of the physical memory, saved on disk, at the time that a fatal system error occurs.

Normally, crash dumps are configured to use the swap partition to write the contents of memory. The savecore program runs when the system reboots and saves the image in a predefined location, usually /var/crash/<hostname>, where <hostname> represents the name of the system.

You configure crash dump files by using the dumpadm command. Running this command with no options, as follows, displays the current configuration, which is obtained from the file /etc/ dumpadm.conf:

# dumpadm

The system responds with this:

Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (swap)
Savecore directory: /var/crash/ultra5
  Savecore enabled: yes

The following is the syntax of the dumpadm command:

/usr/sbin/dumpadm [-nuy] [-c content-type] [-d dump-device]\
[-m mink | minm  |  min%]  [-s savecore-dir] [-r root-dir]

The options for the dumpadm command are described in Table 9.7.

Table 9.7. dumpadm Command Syntax

Option

Description

-c content-type

Modifies crash dump content. Valid values are kernel (just kernel pages), all (all memory pages), and curproc (kernel pages and currently executing process pages).

-d dump-device

Modifies the dump device. This can be specified either as an absolute pathname (such as /dev/dsk/c0t0d0s1) or the word swap, in which case the system identifies the best swap area to use.

-mink|minm|min%

Maintains minimum free space in the current savecore directory, specified either in kilobytes, megabytes, or a percentage of the total current size of the directory.

-n

Disables savecore from running on reboot. This is not recommended because with it, any crash dumps would be lost.

-r root-dir

Specifies a different root directory. If this option is not used, the default / is used.

-s savecore-dir

Specifies a savecore directory other than the default /var/crash/hostname.

-y

Enables savecore to run on the next reboot. This setting is used by default.


To set up a dedicated disk slice named c0t2d0s2 for crash dumps, you issue the following command:

# dumpadm -d /dev/dsk/c0t2d0s2

The system responds with this:

Dump content: kernel pages
Dump device: /dev/dsk/c0t2d0s2 (dedicated)
Savecore directory: /var/crash/ultra5
  Savecore enabled: yes

The dumpadm process is now configured by the Service Management Facility (SMF) at system boot time. Use the svcs command to check its status. The service name for this process is svc:/system/dumpadm:default.


Previous Page
Next Page