IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Nodes hot threads API
editNodes hot threads API
editReturns the hot threads on each selected node in the cluster.
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have the
monitor
ormanage
cluster privilege to use this API.
Description
editThis API yields a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of each node’s top hot threads.
Path parameters
edit-
<node_id>
- (Optional, string) Comma-separated list of node IDs or names used to limit returned information.
Query parameters
edit-
ignore_idle_threads
- (Optional, Boolean) 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.
-
interval
-
(Optional, time units) The interval to do the second
sampling of threads. Defaults to
500ms
. -
snapshots
-
(Optional, integer) Number of samples of thread stacktrace. Defaults to
10
. -
threads
-
(Optional, integer) Specifies the number of hot threads to provide
information for. Defaults to
3
. If you are using this API for troubleshooting, set this parameter to a large number (e.g.9999
) to get information about all the threads in the system. -
timeout
- (Optional, time units) Specifies how long to wait for a response from each node. If omitted, waits forever.
-
type
-
(Optional, string) The type to sample. Available options are
block
,cpu
, andwait
. Defaults tocpu
.
Examples
editresp = client.nodes.hot_threads() print(resp) resp1 = client.nodes.hot_threads( node_id="nodeId1,nodeId2", ) print(resp1)
response = client.nodes.hot_threads puts response response = client.nodes.hot_threads( node_id: 'nodeId1,nodeId2' ) puts response
const response = await client.nodes.hotThreads(); console.log(response); const response1 = await client.nodes.hotThreads({ node_id: "nodeId1,nodeId2", }); console.log(response1);
GET /_nodes/hot_threads GET /_nodes/nodeId1,nodeId2/hot_threads