nodes-hot-threads.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. [[cluster-nodes-hot-threads]]
  2. === Nodes hot threads API
  3. ++++
  4. <titleabbrev>Nodes hot threads</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-cluster[Cluster APIs].
  10. --
  11. Returns the hot threads on each selected node in the cluster.
  12. [[cluster-nodes-hot-threads-api-request]]
  13. ==== {api-request-title}
  14. `GET /_nodes/hot_threads` +
  15. `GET /_nodes/<node_id>/hot_threads`
  16. [[cluster-nodes-hot-threads-api-prereqs]]
  17. ==== {api-prereq-title}
  18. * If the {es} {security-features} are enabled, you must have the `monitor` or
  19. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  20. [[cluster-nodes-hot-threads-api-desc]]
  21. ==== {api-description-title}
  22. This API yields a breakdown of the hot threads on each selected node in the
  23. cluster. The output is plain text with a breakdown of each node's top hot
  24. threads.
  25. [[cluster-nodes-hot-threads-api-path-params]]
  26. ==== {api-path-parms-title}
  27. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=node-id]
  28. [[cluster-nodes-hot-threads-api-query-params]]
  29. ==== {api-query-parms-title}
  30. `ignore_idle_threads`::
  31. (Optional, Boolean) If true, known idle threads (e.g. waiting in a socket
  32. select, or to get a task from an empty queue) are filtered out. Defaults to
  33. true.
  34. `interval`::
  35. (Optional, <<time-units, time units>>) The interval to do the second
  36. sampling of threads. Defaults to `500ms`.
  37. `snapshots`::
  38. (Optional, integer) Number of samples of thread stacktrace. Defaults to
  39. `10`.
  40. `threads`::
  41. (Optional, integer) Specifies the number of hot threads to provide
  42. information for. Defaults to `3`. If you are using this API for
  43. troubleshooting, set this parameter to a large number (e.g.
  44. `9999`) to get information about all the threads in the system.
  45. `timeout`::
  46. (Optional, <<time-units, time units>>) Specifies how long to wait for a
  47. response from each node. If omitted, waits forever.
  48. `type`::
  49. (Optional, string) The type to sample. Available options are `block`, `cpu`, and
  50. `wait`. Defaults to `cpu`.
  51. [[cluster-nodes-hot-threads-api-example]]
  52. ==== {api-examples-title}
  53. [source,console]
  54. --------------------------------------------------
  55. GET /_nodes/hot_threads
  56. GET /_nodes/nodeId1,nodeId2/hot_threads
  57. --------------------------------------------------