System Administration Guide: Basic Administration

Procedurex86: How to Force a Crash Dump and Reboot of the System

If you cannot use the reboot -d or the halt -d command, you can use the kernel debugger, kmdb, to force a crash dump. The kernel debugger must have been loaded, either at boot, or with the mdb -k command, for the following procedure to work.


Note –

You must be in text mode to enter the kernel debugger (kmdb). So, first exit any window system.


  1. If a locally-attached keyboard is being used as the system console, press F1-A on that keyboard. If the system is configured to use a remote (serial) console, use the mechanism that is appropriate to that console to send a break character.

    The kmdb prompt is displayed.

  2. Use the systemdump macro to induce a crash.


    [0]> $<systemdump
    

    Panic messages are displayed, the crash dump is saved, and the system reboots.

  3. Verify that the system has rebooted by logging in at the console login prompt.


Example 16–10 x86: Forcing a Crash Dump and Reboot of the System by Using halt -d

This example shows how to force a crash dump and reboot of the x86 based system neptune by using the halt -d and boot commands. Use this method to force a crash dump of the system. You will need to manually reboot the system after running the halt command with the -d option.


# halt -d
Aug 11 12:51:27 neptune halt:
halted by <user> panic[cpu45]/thread=d3971a00: forced crash dump initiated at user request

d363ae58 genunix:kadmin+bd (5, 0, 0, d3fefac0)
d363af88 genunix:uadmin+88 (5, 0, 0, 0, 0, d363afb4)

syncing file systems... done
dumping to /dev/dsk/c0t0d0s1, offset 107806720, content: kernel
100% done: 40223 pages dumped, compression ratio 4.11, dump succeeded
Press any key to reboot.
Resetting...
.
.
.
SunOS Secondary Boot version 3.00
Autobooting from bootpath: /pci@0,0/pci1028,10a@3/sd@0,0:a 
Running Configuration Assistant... 
If the system hardware has changed, or to boot from a different
device, interrupt the autoboot process by pressing ESC.


Initializing system
Please wait...   

<<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci1028,10a@3/sd@0,0:a
Boot args:

Type    b [file-name] [boot-flags] <ENTER>    to boot with options
or      i <ENTER>                             to enter boot interpreter
or      <ENTER>                               to boot with defaults

                  <<< timeout in 5 seconds >>>

Select (b)oot or (i)nterpreter:
Loading kmdb...
SunOS Release 5.10 Version s10_62 32-bit
Copyright 1983-2004 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
configuring IPv4 interfaces: iprb0.
add net default: gateway 172.20.26.248
Hostname: neptune
The system is coming up.  Please wait.
checking ufs filesystems
/dev/rdsk/c0t0d0s7: is logging.
NIS domain name is example.com
starting rpc services: rpcbind keyserv ypbind done.
Setting netmask of iprb0 to 255.255.255.0
Setting default IPv4 interface for multicast: add net 224.0/4: gateway venus
syslog service starting.
System dump time: Wed Aug 11 12:51:29 2004
Aug 11 13:13:26 venus savecore: saving system crash dump in /var/crash/venus/*.1
Constructing namelist /var/crash/venus/unix.1
Constructing corefile /var/crash/venus/vmcore.1
100% done: 42157 of 42157 pages saved
volume management starting.
The system is ready.
.
.
.