---
type: api
title: Get hot threads
description: 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.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodehotthreads
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodehotthreads
products:
  - Logstash
---

# Get hot threads

- Server: `/`

## Paths

- `GET` `/_node/hot_threads`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/logstash/v9/authentication#basicauth)

## Description

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 String Parameters

- `threads` (integer · default: 10)
  The number of hot threads to return.
- `stacktrace_size` (integer · default: 50)
  The depth of the stack trace to report for each thread.
- `ignore_idle_threads` (boolean · default: true)
  If true, does not return idle threads.
- `pretty` (boolean)
  If you append `?pretty=true` to the request, the JSON returned will be pretty formatted. Use it for debugging only!
- `human` (boolean)
  If you append `?human=true` to the request, the JSON returned will be in a human-readable format.

## Response

Indicates a successful call

`application/json`

- `hot_threads` (object)
  - `time` (string)
  - `busiest_threads` (integer)
  - `threads` ([] Thread)
    - `name` (string)
    - `thread_id` (integer)
    - `percent_of_cpu_time` (number)
    - `state` (string)
    - `traces` ([] string)
## Code Examples

#### Console

```console
GET /_node/hot_threads
```

#### curl

```curl
curl -X GET "/_node/hot_threads"
```

## Response Examples

#### Node hot threads example1

```json
{
  "hot_threads": {
    "time": "2025-01-06T18:25:28-07:00",
    "busiest_threads": 3,
    "threads": [
      {
        "name": "Ruby-0-Thread-7",
        "thread_id": 37,
        "percent_of_cpu_time": 0,
        "state": "timed_waiting",
        "traces": [
          "java.lang.Object.wait(Native Method)",
          "org.jruby.RubyThread.sleep(RubyThread.java:1002)",
          "org.jruby.RubyKernel.sleep(RubyKernel.java:803)"
        ]
      },
      {
        "name": "[test2]\u003Eworker3",
        "thread_id": 10,
        "percent_of_cpu_time": 0.85,
        "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)"
        ]
      },
      {
        "name": "[test2]\u003Eworker2",
        "thread_id": 11,
        "percent_of_cpu_time": 0.85,
        "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)"
        ]
      }
    ]
  }
}
```

