|
1 | 1 | [[cluster-nodes-hot-threads]] |
2 | 2 | === Nodes hot_threads |
3 | 3 |
|
| 4 | +Returns the hot threads on each selected node in the cluster. |
| 5 | + |
| 6 | + |
| 7 | +[[cluster-nodes-hot-threads-api-request]] |
| 8 | +==== {api-request-title} |
| 9 | + |
| 10 | +`GET /_nodes/hot_threads` + |
| 11 | + |
| 12 | +`GET /_nodes/{node_id}/hot_threads` |
| 13 | + |
| 14 | + |
| 15 | +[[cluster-nodes-hot-threads-api-desc]] |
| 16 | +==== {api-description-title} |
| 17 | + |
4 | 18 | This API yields a breakdown of the hot threads on each selected node in the |
5 | | -cluster. Its endpoints are `/_nodes/hot_threads` and |
6 | | -`/_nodes/{nodes}/hot_threads`: |
| 19 | +cluster. The output is plain text with a breakdown of each node's top hot |
| 20 | +threads. |
| 21 | + |
| 22 | + |
| 23 | +[[cluster-nodes-hot-threads-api-path-params]] |
| 24 | +==== {api-path-parms-title} |
| 25 | + |
| 26 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id] |
| 27 | + |
| 28 | + |
| 29 | +[[cluster-nodes-hot-threads-api-query-params]] |
| 30 | +==== {api-query-parms-title} |
| 31 | + |
| 32 | + |
| 33 | +`ignore_idle_threads`:: |
| 34 | + (Optional, boolean) If true, known idle threads (e.g. waiting in a socket |
| 35 | + select, or to get a task from an empty queue) are filtered out. Defaults to |
| 36 | + true. |
| 37 | + |
| 38 | +`interval`:: |
| 39 | + (Optional, <<time-units, time units>>) The interval to do the second |
| 40 | + sampling of threads. Defaults to `500ms`. |
| 41 | + |
| 42 | +`snapshots`:: |
| 43 | + (Optional, integer) Number of samples of thread stacktrace. Defaults to |
| 44 | + `10`. |
| 45 | + |
| 46 | +`threads`:: |
| 47 | + (Optional, integer) Specifies the number of hot threads to provide |
| 48 | + information for. Defaults to `3`. |
| 49 | + |
| 50 | +include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms] |
| 51 | + |
| 52 | +`type`:: |
| 53 | + (Optional, string) The type to sample. Available options are `block`, `cpu`, and |
| 54 | + `wait`. Defaults to `cpu`. |
| 55 | + |
| 56 | + |
| 57 | +[[cluster-nodes-hot-threads-api-example]] |
| 58 | +==== {api-examples-title} |
7 | 59 |
|
8 | 60 | [source,js] |
9 | 61 | -------------------------------------------------- |
10 | 62 | GET /_nodes/hot_threads |
11 | 63 | GET /_nodes/nodeId1,nodeId2/hot_threads |
12 | 64 | -------------------------------------------------- |
13 | | -// CONSOLE |
14 | | - |
15 | | -The first command gets the hot threads of all the nodes in the cluster. The |
16 | | -second command gets the hot threads of only `nodeId1` and `nodeId2`. Nodes can |
17 | | -be selected using <<cluster-nodes,node filters>>. |
18 | | - |
19 | | -The output is plain text with a breakdown of each node's top hot threads. The |
20 | | -allowed parameters are: |
21 | | - |
22 | | -[horizontal] |
23 | | -`threads`:: number of hot threads to provide, defaults to 3. |
24 | | -`interval`:: the interval to do the second sampling of threads. |
25 | | - Defaults to 500ms. |
26 | | -`type`:: The type to sample, defaults to cpu, but supports wait and |
27 | | - block to see hot threads that are in wait or block state. |
28 | | -`ignore_idle_threads`:: If true, known idle threads (e.g. waiting in a socket select, or to |
29 | | - get a task from an empty queue) are filtered out. Defaults to true. |
| 65 | +// CONSOLE |
0 commit comments