kmdb Debugger Entry

The operating system kernel implicitly stops executing and enters kmdb when a breakpoint is reached or according to the other execution control settings described in Execution Control in MDB.

You can use the mdb command to access the kmdb kernel debugger in the following ways:

  • Stop the entire cluster node and then drop in to the kmdb kernel debugger.

    mdb -K --stop-entire-cluster-node

    If you run this command from a terminal, specify the -F as follows:

    mdb -K -F --stop-entire-cluster-node

    Note that you can use the --stop-entire-cluster-node option only on a cluster.

  • Stop the entire system and the drop in to the kmdb kernel debugger.

    mdb -K --stop-entire-system

    If you run this command from a terminal, specify the -F as follows:

    mdb -K -F --stop-entire-system
  • Stop the entire non-cluster system and then enable the cluster to take over.

    mdb -K --stop-entire-system --stop-entire-cluster-node

    Caution:

    This is an advanced mdb command usage. Only experts should use this command as it might result in the total loss of any file systems or any pools that have been imported by this node. Never use this command on a production system.
  • Load the kmdb kernel debugger and to continue running the OS.

    mdb -K --load-debugger

    If you run this command from a terminal, specify the -F as follows:

    mdb -K -F --load-debugger
  • Access addresses that are mapped to I/O devices by means of /dev/allmem .

    mdb --kernel --unsafe-io-access
  • Obtain write access to the live kernel.

    mdb --kernel -w --unsafe-write-access

    Note that the --kernel option and the -k option are the same.

On a SPARC system console, use the STOP-A key sequence to send a break and enter kmdb. On an x86 system console, use the F1–A key sequence to send a break and enter kmdb. You can use the kbd command to customize the escape sequence on your Oracle Solaris system. To enter kmdb on a system with a serial console, use the appropriate serial console command to send a break sequence.