Managing Dump and Swap Spaces

A crash dump is a disk copy of the physical memory of the computer at the time of a fatal system error. When a fatal operating system error occurs, a message describing the error is printed to the console. The operating system then generates a crash dump by writing the contents of physical memory to a predetermined dump device,which is typically a local disk partition. The dump device can be configured by way of dumpadm. Once the crash dump has been written to the dump device, the system will reboot.

Following an operating system crash, the savecore utility is executed automatically during boot to retrieve the crash dump from the dump device, and write it to a pair of files in your file system named unix.X and vmcore.X, where X is an integer identifying the dump. Together, these data files form the saved crash dump. The directory in which the crash dump is saved on reboot can also be configured using dumpadm.

By default, the dump device is configured to be an appropriate swap partition.

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

the options for dumpadm command are

  -d <dump_device>
  -s <savecore_dir>
  -u  # forcibly update the kernel dump configuration based on /etc/dumpadm.conf
  -n  # Modify the dump configuration to not to run savecore automatically on reboot
  -y  # Modify the dump configuration to automatically run savecore on reboot. 

Use kdb (crash until solaris 8) command to analyze the crash dump.

Swap

 swap -a swapname  # To add swap space
 swap -d swapname  # To delete swap space
 swap -l  # To list all the swap spaces
 swap -s # Tp print summary info about swap usage and availablility