Get hot threads
Get information about current hot threads for Logstash. A hot thread is a Java thread that has high CPU usage and takes longer than normal to execute.
Query parameters
-
The number of hot threads to return.
Default value is
10
. -
The depth of the stack trace to report for each thread.
Default value is
50
. -
If true, does not return idle threads.
Default value is
true
. -
If you append
?pretty=true
to the request, the JSON returned will be pretty formatted. Use it for debugging only! -
If you append
?human=true
to the request, the JSON returned will be in a human-readable format.
GET /_node/hot_threads
curl \ --request GET 'http://api.example.com/_node/hot_threads' \ --user "username:password"
Response examples (200)
{ "hot_threads": { "time": "2025-01-06T18:25:28-07:00", "threads": [ { "name": "Ruby-0-Thread-7", "state": "timed_waiting", "traces": [ "java.lang.Object.wait(Native Method)", "org.jruby.RubyThread.sleep(RubyThread.java:1002)", "org.jruby.RubyKernel.sleep(RubyKernel.java:803)" ], "thread_id": 37, "percent_of_cpu_time": 0.0 }, { "name": "[test2]>worker3", "state": "waiting", "traces": [ "sun.misc.Unsafe.park(Native Method)", "java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)", "java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)" ], "thread_id": 10, "percent_of_cpu_time": 0.85 }, { "name": "[test2]>worker2", "state": "runnable", "traces": [ "org.jruby.RubyClass.allocate(RubyClass.java:225)", "org.jruby.RubyClass.newInstance(RubyClass.java:856)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)" ], "thread_id": 11, "percent_of_cpu_time": 0.85 } ], "busiest_threads": 3 } }