Oracle® Solaris 11.2 でのシステムサービスの管理

印刷ビューの終了

更新: 2014 年 7 月
 
 

イベント通知パラメータの表示

svcs -n コマンドは、FMA イベント通知パラメータ、システム全体の SMF 状態遷移通知パラメータ、およびサービスインスタンス状態遷移通知パラメータを表示します。これらのパラメータの詳細は、smf(5)のマニュアルページの「通知パラメータ」を参照してください。

$ svcs -n
Notification parameters for FMA Events
    Event: problem-diagnosed
        Notification Type: smtp
            Active: true
            reply-to: root@localhost
            to: root@localhost

        Notification Type: snmp
            Active: true

        Notification Type: syslog
            Active: true

    Event: problem-repaired
        Notification Type: snmp
            Active: true

    Event: problem-resolved
        Notification Type: snmp
            Active: true

System wide notification parameters:
svc:/system/svc/global:default:
    Event: to-maintenance
        Notification Type: smtp
            Active: true
            to: sysadmins@example.com

svc:/application/pkg/mirror:default:
    Event: to-maintenance
        Notification Type: smtp
            Active: true
            to: installteam@example.com

problem-diagnosedproblem-repaired、および problem-resolved の 3 つの FMA イベントが表示されます。4 番目のイベント problem-updated に関する通知パラメータも構成できます。

システム全体の状態遷移通知設定の場合、これらのグローバル設定を格納するサービスも一覧表示されます。このシステム全体の設定はカスタム設定です。システム全体の値、つまりグローバル値は、カスタム値が設定されていないすべてのサービスインスタンスに適用されます。

表示される最後の設定は、特定のサービスインスタンスのカスタム設定です。

指定のイベントだけに関する通知パラメータを表示するには、svccfg listnotify コマンドを使用します。状態遷移イベントの場合は、-g オプションを使用して、グローバル設定を表示します。出力には、通知パラメータ値のソースも表示されます。

$ svccfg listnotify problem-resolved
    Event: problem-resolved (source: svc:/system/fm/notify-params:default)
        Notification Type: snmp
            Active: true
$ svccfg listnotify -g to-maintenance
    Event: to-maintenance (source: svc:/system/svc/global:default)
        Notification Type: smtp
            Active: true
            to: sysadmins@example.com
$ svccfg -s pkg/mirror listnotify to-maintenance
    Event: to-maintenance (source: svc:/application/pkg/mirror)
        Notification Type: smtp
            Active: true
            to: installteam@example.com

イベント通知の構成の詳細は、状態遷移および FMA イベントの通知の構成を参照してください。