---
title: TCP Queue Length
description: Track the size of the TCP buffers with Datadog.
breadcrumbs: Docs > Integrations > TCP Queue Length
---

# TCP Queue Length
Supported OS Integration version1.0.0
## Overview{% #overview %}

This check monitors the usage of the Linux TCP receive and send queues. It can detect if a TCP receive or send queue is full for individual containers.

## Setup{% #setup %}

### Installation{% #installation %}

`tcp_queue_length` is a core Agent 6/7 check that relies on an eBPF part implemented in `system-probe`. Agent version 7.24.1/6.24.1 or above is required.

The eBPF program used by `system-probe` is compiled at runtime and requires you to have access to the proper kernel headers.

On Debian-like distributions, install the kernel headers like this:

```sh
apt install -y linux-headers-$(uname -r)
```

On RHEL-like distributions, install the kernel headers like this:

```sh
yum install -y kernel-headers-$(uname -r)
yum install -y kernel-devel-$(uname -r)
```

**Note**: Windows and CentOS/RHEL versions earlier than 8 are not supported.

### Configuration{% #configuration %}

Enabling the `tcp_queue_length` integration requires both the `system-probe` and the core agent to have the configuration option enabled.

Inside the `system-probe.yaml` configuration file, the following parameters must be set:

```yaml
system_probe_config:
  enable_tcp_queue_length: true
```

1. Edit the `tcp_queue_length.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your tcp_queue_length performance data. See the [sample tcp_queue_length.d/conf.yaml](https://github.com/DataDog/datadog-agent/blob/master/cmd/agent/dist/conf.d/tcp_queue_length.d/conf.yaml.example) for all available configuration options.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent).

### Configuration with Helm{% #configuration-with-helm %}

With the [Datadog Helm chart](https://github.com/DataDog/helm-charts), the `system-probe` must be activated by setting `datadog.systemProbe.enabled` to `true` in the `values.yaml` file. Then, the check can be activated by setting the `datadog.systemProbe.enableTCPQueueLength` parameter.

### Configuration with the Operator (v1.0.0+){% #configuration-with-the-operator-v100 %}

Set the `features.tcpQueueLength.enabled` parameter in the DatadogAgent manifest:

```yaml
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  features:
    tcpQueueLength:
      enabled: true
```

**Note**: When using COS (Container Optimized OS), override the `src` volume in the node Agent:

```yaml
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  features:
    tcpQueueLength:
      enabled: true
  override:
    nodeAgent:
      volumes: 
      - emptyDir: {}
        name: src
```

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) and look for `tcp_queue_length` under the checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

For each container, the `tcp_queue_length` integration returns the read/write buffer's fill percentage of the busiest TCP connection. For example, if a container has three TCP connections, for which their read buffers (that is, receive queues) are 40%, 25%, and 80% full (respectively), the metric `tcp_queue.read_buffer_max_usage_pct` returns the maximum, 0.8 (80%).

|  |
|  |
| **tcp\_queue.read\_buffer\_max\_usage\_pct**(gauge)  | Maximum usage of read buffer in percent across all open connections*Shown as percent*  |
| **tcp\_queue.write\_buffer\_max\_usage\_pct**(gauge) | Maximum usage of write buffer in percent across all open connections*Shown as percent* |

### Service Checks{% #service-checks %}

The TCP Queue Length check does not include any service checks.

### Events{% #events %}

The TCP Queue Length check does not include any events.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
