> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/data-pipeline/inputs/windows-system-statistics.md).

# Windows System Statistics (winstat)

{% hint style="info" %}
**Supported event types:** `logs`
{% endhint %}

The *Windows System Statistics* (`winstat`) input plugin collects system-level statistics from Windows environments, including CPU usage, memory consumption, disk I/O, and network activity. This plugin uses Windows Performance Counters to gather real-time system metrics.

{% hint style="info" %}
This plugin is only available on Windows operating systems and requires appropriate permissions to access Windows Performance Counters.
{% endhint %}

## Configuration parameters

The plugin supports the following configuration parameters:

| Key             | Description                                                                                               | Default |
| --------------- | --------------------------------------------------------------------------------------------------------- | ------- |
| `interval_sec`  | Polling interval in seconds.                                                                              | `1`     |
| `interval_nsec` | Polling interval in nanoseconds.                                                                          | `0`     |
| `threaded`      | Indicates whether to run this input in its own [thread](/manual/administration/multithreading.md#inputs). | `false` |

## Metrics collected

The `winstat` plugin collects the following system statistics:

| Metric Category | Description                                                                   |
| --------------- | ----------------------------------------------------------------------------- |
| CPU             | CPU usage percentage, including user and system time.                         |
| Memory          | Memory usage including total, available, and used memory.                     |
| Disk            | Disk I/O statistics including read/write operations and throughput.           |
| Network         | Network interface statistics including bytes sent/received and packet counts. |

## Get started

To collect Windows system statistics, you can run the plugin from the command line or through the configuration file:

### Command line

You can run the plugin from the command line:

```shell
fluent-bit -i winstat -o stdout
```

Which returns information similar to the following:

```
...
[0] winstat: [1699123456.123456789, {"cpu.usage"=>15.3, "cpu.user"=>10.2, "cpu.system"=>5.1, "memory.total"=>8192, "memory.available"=>4096, "memory.used"=>4096, "disk.read_bytes"=>1024000, "disk.write_bytes"=>512000, "network.bytes_sent"=>2048000, "network.bytes_recv"=>1024000}]
[1] winstat: [1699123457.123456789, {"cpu.usage"=>16.1, "cpu.user"=>11.0, "cpu.system"=>5.1, "memory.total"=>8192, "memory.available"=>4080, "memory.used"=>4112, "disk.read_bytes"=>1025000, "disk.write_bytes"=>515000, "network.bytes_sent"=>2050000, "network.bytes_recv"=>1025000}]
...
```

### Configuration file

In your main configuration file append the following:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
  inputs:
    - name: winstat
      tag: winstat
      interval_sec: 1
      interval_nsec: 0

  outputs:
    - name: stdout
      match: '*'
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[INPUT]
  Name          winstat
  Tag           winstat
  Interval_Sec  1
  Interval_Nsec 0

[OUTPUT]
  Name   stdout
  Match  *
```

{% endtab %}
{% endtabs %}

Total interval (sec) = `interval_sec` + (`interval_nsec` / 1000000000)

For example: `1.5s` = `1s` + `500000000ns`

{% hint style="info" %}
For Prometheus-based metrics collection on Windows, consider using the [Windows Exporter Metrics](/manual/data-pipeline/inputs/windows-exporter-metrics.md) input plugin instead.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluentbit.io/manual/data-pipeline/inputs/windows-system-statistics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
