Solaris のシステム管理 (基本編)

x86: クラッシュダンプを強制してシステムをリブートする

場合によっては、トラブルシューティングの目的でクラッシュダンプを強制実行し、システムをリブートする必要があります。デフォルトでは、savecore 機能を使用できます。

システムのクラッシュダンプについては、『Solaris のシステム管理 (上級編)』の第 17 章「システムクラッシュ情報の管理 (手順)」を参照してください。

Procedurex86: クラッシュダンプを強制してシステムをリブートする方法

reboot -d コマンドまたは halt -d コマンドを使用できない場合は、カーネルデバッガ kmdb を使用してクラッシュダンプを強制的に実行できます。次の手順を実行するには、ブート時または mdb -k コマンド経由でカーネルデバッガが読み込まれている必要があります。


注 –

カーネルデバッガ (kmdb) に入るにはテキストモードでなければなりません。したがって、まずウィンドウシステムを終了してください。


  1. ローカル接続されたキーボードをシステムコンソールとして使用している場合、そのキーボード上で F1 + A キーを押します。リモート (シリアル) コンソールを使用するようにシステムが設定されている場合、そのコンソールに合った機構を使って改行文字を送信します。

    kmdb プロンプトが表示されます。

  2. systemdump マクロを使ってクラッシュを誘発します。


    [0]> $<systemdump
    

    パニックメッセージが表示され、クラッシュダンプが保存され、システムがリブートします。

  3. コンソールログインプロンプトでログインして、システムがリブートされていることを確認します。


例 16–10 x86: halt -d コマンドを使用してシステムのクラッシュダンプとリブートを強制実行する

この例は、halt -d コマンドと boot コマンドを使って、x86 システム neptune のクラッシュダンプとリブートを強制実行する方法を示しています。システムのクラッシュダンプを強制するには、この方法を使用してください。-d オプションを指定して halt コマンドを実行したあと、手動でリブートする必要があります。


# 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.
.
.
.