---
type: api
title: Get Cgroup statistics
description: Get a more accurate view of CPU statistics from control groups (Cgroup) if available.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodestatsos
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodestatsos
products:
  - Logstash
---

# Get Cgroup statistics

- Server: `/`

## Paths

- `GET` `/_node/stats/os`

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

## Description

Get a more accurate view of CPU statistics from control groups (Cgroup) if available.

## Query String Parameters

- `pretty` (boolean)
  If you append `?pretty=true` to the request, the JSON returned will be pretty formatted. Use it for debugging only!

## Response

A JSON object containing OS statistics.

`application/json`

- `os` (object)
  - `cgroup` (object)
    - `cpuacct` (object)
      - `control_group` (string)
      - `usage_nanos` (integer)
    - `cpu` (object)
      - `control_group` (string)
      - `cfs_period_micros` (integer)
      - `cfs_quota_micros` (integer)
      - `stat` (object)
        - `number_of_elapsed_periods` (integer)
        - `number_of_times_throttled` (integer)
        - `time_throttled_nanos` (integer)
## Code Examples

#### Console

```console
GET /_node/stats/os
```

#### curl

```curl
curl -X GET "/_node/stats/os"
```

## Response Examples

#### 200

```json
{
  "os": {
    "cgroup": {
      "cpuacct": {
        "control_group": "/elastic1",
        "usage_nanos": 378477588075
      },
      "cpu": {
        "control_group": "/elastic1",
        "cfs_period_micros": 1000000,
        "cfs_quota_micros": 800000,
        "stat": {
          "number_of_elapsed_periods": 4157,
          "number_of_times_throttled": 460,
          "time_throttled_nanos": 581617440755
        }
      }
    }
  }
}
```

