JavaScript is required to for searching.
ナビゲーションリンクをスキップ
印刷ビューの終了
Oracle Solaris 11.1 システムのブートおよびシャットダウン     Oracle Solaris 11.1 Information Library (日本語)
search filter icon
search icon

ドキュメントの情報

はじめに

1.  システムのブートとシャットダウン (概要)

2.  x86: GRand Unified Bootloader の管理 (タスク)

3.  システムのシャットダウン (タスク)

システムのシャットダウン

システムのシャットダウンに関するガイドライン

システムシャットダウンコマンド

システムのシャットダウン

システムにログインしているユーザーを確認する方法

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

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

システムデバイスの電源の切断

4.  システムのブート (タスク)

5.  システムのネットワークからのブート (タスク)

6.  システムのブートのトラブルシューティング (タスク)

索引

システムのシャットダウン

次の手順と例は、shutdown および init コマンドを使用してシステムをシャットダウンする方法について説明したものです。

halt コマンドの使用など、復旧の目的でのシステムのシャットダウンについては、「SPARC: 復旧を目的としてシステムを停止する方法」を参照してください。

システムにログインしているユーザーを確認する方法

マルチユーザーのタイムシェアリングシステムとして使用されている Oracle Solaris システムでは、システムをシャットダウンする前に、システムにログインしているユーザーがいるかどうかの確認が必要になることがあります。このような場合は次の手順を使用します。

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

  1. root 役割になります。

    『Oracle Solaris 11.1 の管理: セキュリティーサービス』の「割り当てられている管理権限を使用する方法」を参照してください。

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

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

  3. システムをシャットダウンします。
    # shutdown -iinit-state -ggrace-period -y
    -i init-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 2011

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 2011

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 2011

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

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

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

showmount: venus: RPC: Program not registered
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 2010-12-10 64-bit
Copyright (c) 1983, 2010, 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 にシステムが戻ることを想定しているでしょう。システムをマルチユーザー状態に戻す手順については、第 4 章システムのブート (タスク) を参照してください。

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

スタンドアロンシステムをシャットダウンする必要がある場合は、次の手順を実行します。

  1. root 役割になります。

    『Oracle Solaris 11.1 の管理: セキュリティーサービス』の「割り当てられている管理権限を使用する方法」を参照してください。

  2. システムをシャットダウンします。
    # init 5

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

例 3-4 init コマンドを使用してシステムをシャットダウン状態 (実行レベル 0) にする

この例では、init コマンドを使用して、スタンドアロンシステムを安全な電源切断が可能な実行レベルにしています。

# init 0
#
INIT: New run level: 0
The system is coming down.  Please wait.
.
.
.

The system is down.
syncing file systems... [11] [10] [3] done
Press any key to reboot

参照

システムをシャットダウンした理由にかかわらず、すべてのファイルリソースが利用可能かつユーザーがログイン可能な、実行レベル 3 にシステムが戻ることを想定しているでしょう。