Oracle® Solaris 11.2 システムのブートとシャットダウン

印刷ビューの終了

更新: 2014 年 7 月
 
 

shutdown コマンドを使用してシステムをシャットダウンする方法

  1. root 役割になります。

    Oracle Solaris 11.2 でのユーザーとプロセスのセキュリティー保護 の割り当てられている管理権利の使用を参照してください。

  2. サーバーのシャットダウンの場合は、システムにログインしているユーザーがいるかどうかを確認します。
    # who

    ログインしているすべてのユーザーがリスト表示されます。

  3. システムをシャットダウンします。
    # shutdown -iinit-state -ggrace-period -y
    –iinit-state

    システムをデフォルトの S とは異なる init 状態にします。0、1、2、5、6 のいずれかを指定できます。

    実行レベル 0 および 5 は、システムのシャットダウン用に予約された状態です。実行レベル 6 はシステムをリブートします。実行レベル 2 はマルチユーザーオペレーティング状態として使用できます。

    –ggrace-period

    システムがシャットダウンするまでの時間 (秒) を示します。デフォルト値は 60 秒です。

    –y

    ユーザーの介入なしにシャットダウンを継続します。それ以外の場合、シャットダウンを継続するかどうか 60 秒後に尋ねられます。

    詳細は、shutdown(1M)のマニュアルページを参照してください。

  4. シャットダウンを継続するかどうか尋ねられたら、y を入力します。
    Do you want to continue? (y or n): y

    -y オプションを指定した場合、このプロンプトは表示されません。

  5. プロンプトが表示されたら、root パスワードを入力します。
    Type Ctrl-d to proceed with normal startup,
    (or give root password for system maintenance): xxxxxx
  6. システム管理タスクの実行が完了したら、Ctrl + D を押して、デフォルトのシステム実行レベルに戻ります。
  7. 次の表を使用して、システムが shutdown コマンドで指定した実行レベルに移行したことを確認します。
    指定した実行レベル
    x86 ベースシステムのプロンプト
    SPARC システムのプロンプト
    S (シングルユーザー状態)
    #
    #
    0 (電源切断可能)
    #
    ok または >
    実行レベル 3 (リモートリソースを共有するマルチユーザー状態)
    hostname console login:
    hostname console login:
使用例 3-1  shutdown コマンドを使用してシステムをシングルユーザー状態 (実行レベル S) にする

次の例では、shutdown コマンドを使用して、3 分後にシステムを実行レベル S (シングルユーザー状態) にしています。

# who
root     console      Apr 15 06:20

# shutdown -g180 -y

Shutdown started.    Fri Apr 15 06:20:45 MDT 2014

Broadcast Message from root (console) on portia Fri Apr 15 06:20:46...
The system portia will be shut down in 3 minutes

showmount: portia: RPC: Program not registered
Broadcast Message from root (console) on portia Fri Apr 15 06:21:46...
The system portia will be shut down in 2 minutes

showmount: portia: RPC: Program not registered
Broadcast Message from root (console) on portia Fri Apr 15 06:22:46...
The system portia will be shut down in 1 minute

showmount: portia: RPC: Program not registered
Broadcast Message from root (console) on portia Fri Apr 15 06:23:16...
The system portia will be shut down in 30 seconds

showmount: portia: RPC: Program not registered
Changing to init state s - please wait
svc.startd: The system is coming down for administration.  Please wait.
root@portia:~# Apr 15 06:24:28 portia svc.startd[9]:

Apr 15 06:24:28 portia syslogd: going down on signal 15
svc.startd: Killing user processes.
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
SINGLE USER MODE

Enter user name for system maintenance (control-d to bypass):xxxxxx
#
使用例 3-2  shutdown コマンドを使用してシステムをシャットダウン状態 (実行レベル 0) にする

次の例では、shutdown コマンドを使用して、追加の確認を求めずに 5 分後にシステムを実行レベル 0 にしています。

# who
root       console       Jun 17 12:39...
userabc		 pts/4        Jun 17 12:39   (:0.0)
# shutdown -i0 -g300 -y
Shutdown started.    Fri Apr 15 06:35:48 MDT 2014

Broadcast Message from root (console) on murky Fri Apr 15 06:35:48...
The system pinkytusk will be shut down in 5 minutes

showmount: murkey: RPC: Program not registered
showmount: murkey: RPC: Program not registered
Broadcast Message from root (console) on murkey Fri Apr 15 06:38:48...
The system murkey will be shut down in 2 minutes

showmount: murkey: RPC: Program not registered
Broadcast Message from root (console) on murkey Fri Apr 15 06:39:48...
The system murkey will be shut down in 1 minute

showmount: murkey: RPC: Program not registered
Broadcast Message from root (console) on murkey Fri Apr 15 06:40:18...
The system murkey  will be shut down in 30 seconds

showmount: murkey: RPC: Program not registered
Broadcast Message from root (console) on murkey Fri Apr 15 06:40:38...
THE SYSTEM murkey IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged

showmount: murkey: RPC: Program not registered
Changing to init state 0 - please wait
root@murkey:~# svc.startd: The system is coming down.  Please wait.
svc.startd: 122 system services are now being stopped.
Apr 15 06:41:49 murkey svc.startd[9]:
Apr 15 06:41:50 murkey syslogd: going down on signal 15
svc.startd: Killing user processes.
Apr 15 06:41:57 The system is down.  Shutdown took 69 seconds.
syncing file systems... done
Press any key to reboot.
Resetting...

すべてのデバイスの電源を切断するためにシステムを実行レベル 0 にする場合は、システムデバイスの電源の切断を参照してください。

使用例 3-3  shutdown コマンドを使用してシステムをマルチユーザー状態 (実行レベル 3) にする

次の例では、shutdown コマンドを使用して、2 分後にシステムを実行レベル 3 にリブートしています。確認用プロンプトが表示されないように y オプションを指定しています。

# who
root   	console      Jun 14 15:49    (:0)
userabc    pts/4        Jun 14 15:46    (:0.0)
# shutdown -i6 -g120 -y
Shutdown started.    Fri Apr 15 06:46:50 MDT 2014

Broadcast Message from root (console) on venus Fri Apr 15 06:46:50...
The system venus will be shut down in 2 minutes

Broadcast Message from root (console) on venus Fri Apr 15 06:47:50...
The system venus will be shut down in 1 minute

Broadcast Message from root (console) on venus Fri Apr 15 06:48:20...
The system venus will be shut down in 30 seconds

Broadcast Message from root (console) on venus Fri Apr 15 06:48:40...
THE SYSTEM venus IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged

showmount: venus: RPC: Program not registered
Changing to init state 6 - please wait
root@venus:~# svc.startd: The system is coming down.  Please wait.
svc.startd: 123 system services are now being stopped.
Apr 15 06:49:32 venus svc.startd[9]:
Apr 15 06:49:32 venus syslogd: going down on signal 15
svc.startd: Killing user processes.
Apr 15 06:49:40 The system is down.  Shutdown took 50 seconds.
syncing file systems... done
rebooting...
SunOS Release 5.11 Version 11.2 64-bit
Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved.
Booting to milestone "milestone/single-user:default".
Hostname: venus
NIS domain name is solaris.example.com
.
.
.
venus console login:

関連項目

システムをシャットダウンした理由にかかわらず、すべてのファイルリソースが利用可能かつユーザーがログイン可能な、実行レベル 3 にシステムが戻ることを想定しているでしょう。システムをマルチユーザー状態に戻す手順については、Chapter 4, システムのブート (タスク) を参照してください。