システム・モニターの有効化

propertyManager set コマンドは、システム・モニターを有効にするために使用します。 モニターする警告タイプを構成して、警告を保管するために使用するキャッシュのサイズを設定できます。

始める前に

システム警告を有効にするには、IBM® ヘルス・センターが実行中でなければなりません。

このタスクについて

トポロジーの各ランタイム・サーバーの jvm.options ファイルに IBM ヘルス・センターを追加する必要があります。開発サーバー (cisDev) も IBM ヘルス・センターを実行することができます。IBM ヘルス・センターは、システム警告を収集するための前提条件です。

システム・モニターを開始するには、グローバル warningEnabled プロパティーを true に設定します。システム・モニターは、イベント処理中に通常ではないアクティビティーを検出したときに、eXtreme Scale またはランタイム・サーバーによってログに記録された特定のメッセージを収集します。例えば、イベント処理に時間がかかりすぎたり、エージェントがタイムアウトになったりすると、ランタイム警告メッセージが記録されます。 システム警告メッセージは、ヒープ・サイズの残りが少なくなったり、ガーベッジ・コレクションのカウントがそのしきい値に達したりすると記録されます。

注: 警告は、メモリーに保持されます。サーバーの再始動時に永続化されません。

手順

  1. cisDev サーバーまたはトポロジーの各ランタイム・サーバーの jvm.options ファイルに、 IBM ヘルス・センターを追加します。
    -Xhealthcenter:level=inprocess
  2. 次のコマンドを実行して、これらのすべてのサーバーでグローバル警告プロパティーを有効にします。
    propertyManager set warningEnabled=true
    messages.log ファイルをチェックし、CWMBD0224I: System monitor logging service is enabled というメッセージを探します。
    注: システム・プロパティーは、システムの再始動後も保持されます。
  3. オプション: システム警告メッセージとランタイム警告メッセージを有効にします。
    propertyManager set warningSystemWarningEnabled=true 
    propertyManager set warningRuntimeWarningEnabled=true 
    messages.log ファイルを調べて、次のメッセージを探します。
    CWMBD0218I: systemWarning is enabled.
    CWMBD0218I: runtimeWarning is enabled.
    CWMBD0220I: The Health Center is connected and ready to listen to events.
    CWMBD0240I: The Health Center is set to event only mode.
  4. オプション: propertyManger set コマンドを実行して、それぞれのランタイム警告プロパティーのデフォルト値を編集します。 次の例は、キャッシュが保管できるランタイム警告の最大数を 1200 に設定するコマンドを示しています。
    propertyManager set warningRuntimeWarningMaxSize=1200

タスクの結果

messages.log ファイル内の各ログ・エントリー (LogEntry) には、メッセージ、タイム・スタンプ、警告タイプ (システムまたはランタイム)、および警告レベル (警告、エラー) の警告情報があります。

以下の例は、システム警告タイプの LogEntry を示しています。
LogEntry [type=systemWarning, time=1461636846077,localizedMessage=CWMBD0212W: Heap usage is running high at 90%., solutionVersion=null,level=WARNING]
LogEntry [type=systemWarning, time=1461810776931,localizedMessage=CWMBD0208W: Garbage collection frequency hit 120 times  during the last 58,062ms., solutionVersion=null, level=WARNING]
以下の例は、ランタイム警告タイプの LogEntry を示しています。
LogEntry [type=runtimeWarning, time=1461852102515,localizedMessage=CWOBJ0061W: The transaction with TxID,Local-812A0154-5D23-A8FD-0000-00505691418D, that was last running on  thread, 0264
<GetNextInput-Rolling-IA-PARTITION-7-0>, on shard  DefaultDomain:com.ibm.ia:iaMaps:7 has exceeded the configured transaction timeout value and was been marked rollback-only. This might be caused by lock contention 
or application deadlock, or your  transaction timeout value is set too small., solutionVersion=null,  level=WARNING]
LogEntry [type=runtimeWarning, time=1461852132514,localizedMessage=CWMBD0205W: The warning message containing id  CWOBJ0061W will be suppressed temporarily. 
It has occurred 20 times in  the last 600,000 ms., solutionVersion=null,level=WARNING]
LogEntry [type=runtimeWarning, time=1461625972119,localizedMessage=CWMBD0211W: Possible database slow down where the  transaction takes 11,363ms to complete. 
SELECT EVENT, VERSION FROM  EVENTSTORE WHERE MAPNAME = ? AND EVENTID = ? AND ENTITYID = ? AND  ENTITYTYPE = ?, 4, solutionVersion=null, level=WARNING]

次のタスク

SystemMonitorMXBean API を使用して、各ランタイム・サーバー用に収集された警告メッセージを取得します。詳しくは、SystemMonitorMXBean を参照してください。