24.3. サーバースレッド使用状況の監視

スレッドの使用状況をチェックして、スレッドプールのサイズを適切に設定していることを確認します。

スレッドの使用状況をチェックするには、以下の CLI コマンドを実行します。

/subsystem=messaging-activemq:read-resource(include-runtime)

システムは以下のような結果を返します。

{
    "outcome" => "success",
    "result" => {
        "global-client-scheduled-thread-pool-active-count" => 0,
        "global-client-scheduled-thread-pool-completed-task-count" => 0L,
        "global-client-scheduled-thread-pool-current-thread-count" => 0,
        "global-client-scheduled-thread-pool-keepalive-time" => 10000000L,
        "global-client-scheduled-thread-pool-largest-thread-count" => 0,
        "global-client-scheduled-thread-pool-max-size" => undefined,
        "global-client-scheduled-thread-pool-task-count" => 0L,
        "global-client-thread-pool-active-count" => 0,
        "global-client-thread-pool-completed-task-count" => 2L,
        "global-client-thread-pool-current-thread-count" => 2,
        "global-client-thread-pool-keepalive-time" => 60000000000L,
        "global-client-thread-pool-largest-thread-count" => 2,
        "global-client-thread-pool-max-size" => undefined,
        "global-client-thread-pool-task-count" => 2L,
        "connection-factory" => undefined,
        "connector" => undefined,
        "discovery-group" => undefined,
        "external-jms-queue" => undefined,
        "external-jms-topic" => undefined,
        "http-connector" => undefined,
        "in-vm-connector" => undefined,
        "jms-bridge" => undefined,
        "pooled-connection-factory" => undefined,
        "remote-connector" => undefined,
        "server" => {"default" => undefined}
    }
}

表24.1 スレッド使用状況データ

使用状況属性説明

global-client-scheduled-thread-pool-active-count

現在タスクを実行しているすべての ActiveMQ クライアントが使用しているスケジュールプールスレッドの数。

global-client-scheduled-thread-pool-completed-task-count

サーバーが起動してからすべての ActiveMQ クライアントによって実行された、スケジュールプールスレッドを使用するタスクの数。

global-client-scheduled-thread-pool-current-thread-count

スケジュールプール内で、すべての Active MQ クライアントが使用しているスレッドの現在の数。

global-client-scheduled-thread-pool-keepalive-time

スケジュールスレッドプール内で、アイドル状態のときに実行中のスレッドを保持する時間。

global-client-scheduled-thread-pool-largest-thread-count

スケジュールプール内で、すべての Active MQ クライアントによって同時に使用されたスレッドの最大数。

global-client-scheduled-thread-pool-max-size

スケジュールプール内で、このサーバー内で稼働しているすべての ActiveMQ クライアントによって使用されるスレッドの最大数。

global-client-scheduled-thread-pool-task-count

スケジュールスレッドプール内で、すべての Active MQ クライアントによってスケジュールされたタスクの合計数。

global-client-thread-pool-active-count

現在タスクを実行しているすべての ActiveMQ クライアントによって使用される汎用プールスレッドの数。

global-client-thread-pool-completed-task-count

すべての ActiveMQ クライアントによって実行された汎用プールスレッドを使用するタスクの数。

global-client-thread-pool-current-thread-count

汎用プール内で、すべての Active MQ クライアントが使用しているスレッドの現在の数。

global-client-thread-pool-keepalive-time

汎用スレッドプール内で、アイドル状態のときにスレッドを実行し続ける時間。

global-client-thread-pool-largest-thread-count

汎用プール内で、すべての Active MQ クライアントによって同時に使用されたスレッドの最大数。

global-client-thread-pool-max-size

汎用プール内で、このサーバー内で稼働しているすべての ActiveMQ クライアントによって使用されるスレッドの最大数。

global-client-thread-pool-task-count

汎用スレッドプール内で、すべての Active MQ クライアントによってスケジュールされたタスクの合計数。