diff --git a/docs/reference/cluster/nodes-hot-threads.asciidoc b/docs/reference/cluster/nodes-hot-threads.asciidoc index dc8b1537807..c8fa2c9bf7c 100644 --- a/docs/reference/cluster/nodes-hot-threads.asciidoc +++ b/docs/reference/cluster/nodes-hot-threads.asciidoc @@ -14,3 +14,5 @@ threads. Parameters allowed are: Defaults to 500ms. `type`:: The type to sample, defaults to cpu, but supports wait and block to see hot threads that are in wait or block state. +`ignore_idle_threads`:: If true, known idle threads (e.g. waiting in a socket select, or to + get a task from an empty queue) are filtered out. Defaults to true. diff --git a/rest-api-spec/api/nodes.hot_threads.json b/rest-api-spec/api/nodes.hot_threads.json index f32155894f2..f6e6e01dafd 100644 --- a/rest-api-spec/api/nodes.hot_threads.json +++ b/rest-api-spec/api/nodes.hot_threads.json @@ -24,6 +24,10 @@ "type" : "number", "description" : "Specify the number of threads to provide information for (default: 3)" }, + "ignore_idle_threads": { + "type" : "boolean", + "description" : "Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)" + }, "type": { "type" : "enum", "options" : ["cpu", "wait", "block"], diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java index faa0320168c..8db432b11e3 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java @@ -19,6 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; +import org.elasticsearch.Version; import org.elasticsearch.action.support.nodes.NodesOperationRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -35,6 +36,7 @@ public class NodesHotThreadsRequest extends NodesOperationRequest