> For the complete documentation index, see [llms.txt](https://docs.weka.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.weka.io/6.0/getting-started-with-weka/weka-cli-overview/cli-reference-guide/weka-stats.md).

# weka stats

Show statistics that conform to the filter criteria. Each statistic and sample is presented in its own row, possibly aggregated.

```sh
weka stats [--accumulated] [--aggregate-by <grouping>] [--category <statistic-categories>…] [--end-time <time>] [--exclude-process-ids <process-ids>…] [--histogram] [--interval <duration>] [--no-units] [--no-zeros] [--param <strings>…] [--per-process] [--per-role] [--process-ids <process-ids>…] [--query-timeout <duration>] [--resolution-secs <duration>] [--role <process-role>] [--show-internal] [--skip-validations] [--start-time <time>] [--stat <statistic-names>…]
```

| Parameter                               | Description                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--accumulated`                         | Show accumulated statistics. If not set, show rate statistics.                                                                                                                                                                                                                                                                               |
| `--aggregate-by` \<grouping>            | Aggregate statistics by the specified criteria. Valid values: process, role, container, server.                                                                                                                                                                                                                                              |
| `--category` \<statistic-categories>…   | Retrieve only statistics of the specified categories. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                    |
| `--end-time` \<time>                    | Query for statstics up to this time point.                                                                                                                                                                                                                                                                                                   |
| `--exclude-process-ids` \<process-ids>… | Do not include statistics from specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                      |
| `--histogram`                           | Render histograms visually.                                                                                                                                                                                                                                                                                                                  |
| `--interval` \<duration>                | Duration (in seconds) of the time report.                                                                                                                                                                                                                                                                                                    |
| `--no-units`                            | Suppress units from table output.                                                                                                                                                                                                                                                                                                            |
| `-Z`, `--no-zeros`                      | Do not retrieve statistics with zero values.                                                                                                                                                                                                                                                                                                 |
| `--param` \<strings>…                   | For parameterized statistics, retrieve only the instantiations where the specified parameter is of the specified value. Multiple values can be supplied for the same key, e.g. '--param method:putBlocks --param method:initBlock'. Multiple values may be supplied separated by commas, or the option may be repeated.                      |
| `--per-process`                         | Aggregate statistics by process.                                                                                                                                                                                                                                                                                                             |
| `--per-role`                            | Aggregate stats per process role.                                                                                                                                                                                                                                                                                                            |
| `--process-ids` \<process-ids>…         | Only include the specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                                    |
| `--query-timeout` \<duration>           | Per-container timeout (default 5 seconds).                                                                                                                                                                                                                                                                                                   |
| `--resolution-secs` \<duration>         | Length of each interval in the report period.                                                                                                                                                                                                                                                                                                |
| `--role` \<process-role>                | Only include processes with the specified role. Valid values: management, compute, drives, frontend, dataserv.                                                                                                                                                                                                                               |
| `--show-internal`                       | Show internal statistics.                                                                                                                                                                                                                                                                                                                    |
| `--skip-validations`                    | Do not validate statistic or category names.                                                                                                                                                                                                                                                                                                 |
| `--start-time` \<time>                  | Query for statistics starting at this time.                                                                                                                                                                                                                                                                                                  |
| `--stat` \<statistic-names>…            | Retrieve only these specific statistics. Glob patterns (\*, ?, \[]) are supported. For a parameterized statistic, append the parameter value as a suffix, e.g. 'CLIENT\_RPC\_CALLS.writeWithChecksums' for one value or 'CLIENT\_RPC\_CALLS.\*' for all. Multiple values may be supplied separated by commas, or the option may be repeated. |

**Columns:** `grouping`, `timestamp`, `category`, `stat`, `unit`, `value`, `containerId`, `containerName`, `hostname`, `roles`, `histogram`

## weka stats categories

Show the statistic categories.

```sh
weka stats categories [--show-internal]
```

| Parameter         | Description               |
| ----------------- | ------------------------- |
| `--show-internal` | Show internal statistics. |

**Columns:** `category`, `clabel`

## weka stats realtime

Get performance related stats which are updated in a one-second interval.

```sh
weka stats realtime [<process>…] [--footer] [--hostnames <strings>…] [--role <process-roles>…]
```

| Parameter                  | Description                                                                                                                                                                                        |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `process`…                 | Only include the specified processes.                                                                                                                                                              |
| `--footer`                 | Display a summary at the end of the report showing the totals for the statistics.                                                                                                                  |
| `--hostnames` \<strings>…  | Only include processes on these hostnames. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                     |
| `--role` \<process-roles>… | Only include processes with the specified role. Multiple values may be supplied separated by commas, or the option may be repeated. Valid values: management, compute, drives, frontend, dataserv. |

**Columns:** `process`, `hostname`, `roles`, `mode`, `writeps`, `writebps`, `wlatency`, `readps`, `readbps`, `rlatency`, `ops`, `cpu`, `l6recv`, `l6send`, `upload`, `download`, `rdmarecv`, `rdmasend`

### weka stats realtime top

Show the top containers (or servers, with --per-server) by realtime load, separately for backends and clients. The ranking is done on the cluster; idle containers and servers are omitted from the lists, while the totals (--show-total) include all of them.

```sh
weka stats realtime top [<count>…] [--backends] [--clients] [--footer] [--per-server] [--perf] [--sort-by <sort-by>]
```

| Parameter              | Description                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------- |
| `count`…               | Number of top entries to show in each list (1-100, default 10).                                |
| `--backends`           | Show only backends.                                                                            |
| `--clients`            | Show only clients.                                                                             |
| `--footer`             | Show the totals of each printed list (including idle containers and servers).                  |
| `--per-server`         | Aggregate all the containers of each server into a single entry.                               |
| `--perf`               | Also show a performance report of the request (timings and sizes).                             |
| `--sort-by` \<sort-by> | Rank by: iops, throughput or latency (default: iops). Valid values: iops, throughput, latency. |

**Columns:** `id`, `containername`, `hostname`, `mode`, `ops`, `readps`, `writeps`, `readbps`, `writebps`, `bps`, `rlatency`, `wlatency`, `avglatency`, `cpu`, `processes`

## weka stats retention

Configure retention for statistics. Longer retention periods consume more storage.

```sh
weka stats retention
```

### weka stats retention reset

Reset statistics retention to the default.

```sh
weka stats retention reset [--dry-run]
```

| Parameter   | Description                                        |
| ----------- | -------------------------------------------------- |
| `--dry-run` | Only test the command. Does not affect the system. |

### weka stats retention set

Choose for how long to keep statistics. Longer retention periods consume more storage.

```sh
weka stats retention set --days <uint> [--dry-run]
```

| Parameter          | Description                                                                                                                  |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `--days` \<uint>\* | Number of days to keep the statistics (1-30).                                                                                |
| `--dry-run`        | Only test the command. Does not affect the system. This is primarily useful to verify sufficient space exists for retention. |

### weka stats retention status

Show configured statistics retention, including estimated storage requirements.

```sh
weka stats retention status
```

## weka stats show

This is an alias for weka stats table.

This command is deprecated. Use weka stats table instead.

```sh
weka stats show [--accumulated] [--aggregate-by <grouping>] [--category <statistic-categories>…] [--end-time <time>] [--exclude-process-ids <process-ids>…] [--histogram] [--interval <duration>] [--no-units] [--no-zeros] [--param <strings>…] [--per-process] [--process-ids <process-ids>…] [--query-timeout <duration>] [--resolution-secs <duration>] [--role <process-role>] [--show-internal] [--skip-validations] [--start-time <time>] [--stat <statistic-names>…]
```

| Parameter                               | Description                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--accumulated`                         | Show accumulated statistics. If not set, show rate statistics.                                                                                                                                                                                                                                                                               |
| `--aggregate-by` \<grouping>            | Aggregate statistics by the specified criteria. Valid values: process, role, container, server.                                                                                                                                                                                                                                              |
| `--category` \<statistic-categories>…   | Retrieve only statistics of the specified categories. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                    |
| `--end-time` \<time>                    | Query for statstics up to this time point.                                                                                                                                                                                                                                                                                                   |
| `--exclude-process-ids` \<process-ids>… | Do not include statistics from specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                      |
| `--histogram`                           | Render histograms visually.                                                                                                                                                                                                                                                                                                                  |
| `--interval` \<duration>                | Duration (in seconds) of the time report.                                                                                                                                                                                                                                                                                                    |
| `--no-units`                            | Suppress units from table output.                                                                                                                                                                                                                                                                                                            |
| `-Z`, `--no-zeros`                      | Do not retrieve statistics with zero values.                                                                                                                                                                                                                                                                                                 |
| `--param` \<strings>…                   | For parameterized statistics, retrieve only the instantiations where the specified parameter is of the specified value. Multiple values can be supplied for the same key, e.g. '--param method:putBlocks --param method:initBlock'. Multiple values may be supplied separated by commas, or the option may be repeated.                      |
| `--per-process`                         | Aggregate statistics by process.                                                                                                                                                                                                                                                                                                             |
| `--process-ids` \<process-ids>…         | Only include the specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                                    |
| `--query-timeout` \<duration>           | Per-container timeout (default 5 seconds).                                                                                                                                                                                                                                                                                                   |
| `--resolution-secs` \<duration>         | Length of each interval in the report period.                                                                                                                                                                                                                                                                                                |
| `--role` \<process-role>                | Only include processes with the specified role. Valid values: management, compute, drives, frontend, dataserv.                                                                                                                                                                                                                               |
| `--show-internal`                       | Show internal statistics.                                                                                                                                                                                                                                                                                                                    |
| `--skip-validations`                    | Do not validate statistic or category names.                                                                                                                                                                                                                                                                                                 |
| `--start-time` \<time>                  | Query for statistics starting at this time.                                                                                                                                                                                                                                                                                                  |
| `--stat` \<statistic-names>…            | Retrieve only these specific statistics. Glob patterns (\*, ?, \[]) are supported. For a parameterized statistic, append the parameter value as a suffix, e.g. 'CLIENT\_RPC\_CALLS.writeWithChecksums' for one value or 'CLIENT\_RPC\_CALLS.\*' for all. Multiple values may be supplied separated by commas, or the option may be repeated. |

## weka stats table

List statistics that conform to the filter criteria. Each sample period is a row, with different statistics each in their own column. This may facilitate analysis involving multiple statistics at the same time.

```sh
weka stats table [--accumulated] [--aggregate-by <grouping>] [--category <statistic-categories>…] [--end-time <time>] [--exclude-process-ids <process-ids>…] [--histogram] [--interval <duration>] [--no-units] [--no-zeros] [--param <strings>…] [--per-process] [--process-ids <process-ids>…] [--query-timeout <duration>] [--resolution-secs <duration>] [--role <process-role>] [--show-internal] [--skip-validations] [--start-time <time>] [--stat <statistic-names>…]
```

| Parameter                               | Description                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--accumulated`                         | Show accumulated statistics. If not set, show rate statistics.                                                                                                                                                                                                                                                                               |
| `--aggregate-by` \<grouping>            | Aggregate statistics by the specified criteria. Valid values: process, role, container, server.                                                                                                                                                                                                                                              |
| `--category` \<statistic-categories>…   | Retrieve only statistics of the specified categories. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                    |
| `--end-time` \<time>                    | Query for statstics up to this time point.                                                                                                                                                                                                                                                                                                   |
| `--exclude-process-ids` \<process-ids>… | Do not include statistics from specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                      |
| `--histogram`                           | Render histograms visually.                                                                                                                                                                                                                                                                                                                  |
| `--interval` \<duration>                | Duration (in seconds) of the time report.                                                                                                                                                                                                                                                                                                    |
| `--no-units`                            | Suppress units from table output.                                                                                                                                                                                                                                                                                                            |
| `-Z`, `--no-zeros`                      | Do not retrieve statistics with zero values.                                                                                                                                                                                                                                                                                                 |
| `--param` \<strings>…                   | For parameterized statistics, retrieve only the instantiations where the specified parameter is of the specified value. Multiple values can be supplied for the same key, e.g. '--param method:putBlocks --param method:initBlock'. Multiple values may be supplied separated by commas, or the option may be repeated.                      |
| `--per-process`                         | Aggregate statistics by process.                                                                                                                                                                                                                                                                                                             |
| `--process-ids` \<process-ids>…         | Only include the specified processes. Multiple values may be supplied separated by commas, or the option may be repeated.                                                                                                                                                                                                                    |
| `--query-timeout` \<duration>           | Per-container timeout (default 5 seconds).                                                                                                                                                                                                                                                                                                   |
| `--resolution-secs` \<duration>         | Length of each interval in the report period.                                                                                                                                                                                                                                                                                                |
| `--role` \<process-role>                | Only include processes with the specified role. Valid values: management, compute, drives, frontend, dataserv.                                                                                                                                                                                                                               |
| `--show-internal`                       | Show internal statistics.                                                                                                                                                                                                                                                                                                                    |
| `--skip-validations`                    | Do not validate statistic or category names.                                                                                                                                                                                                                                                                                                 |
| `--start-time` \<time>                  | Query for statistics starting at this time.                                                                                                                                                                                                                                                                                                  |
| `--stat` \<statistic-names>…            | Retrieve only these specific statistics. Glob patterns (\*, ?, \[]) are supported. For a parameterized statistic, append the parameter value as a suffix, e.g. 'CLIENT\_RPC\_CALLS.writeWithChecksums' for one value or 'CLIENT\_RPC\_CALLS.\*' for all. Multiple values may be supplied separated by commas, or the option may be repeated. |

## weka stats types

List statistics types that conform to the filter criteria.

```sh
weka stats types [<category_or_name>…] [--show-internal]
```

| Parameter           | Description                                                        |
| ------------------- | ------------------------------------------------------------------ |
| `category_or_name`… | Statistic category or name; only show stats matching one of these. |
| `--show-internal`   | Show internal statistics.                                          |

**Columns:** `category`, `clabel`, `identifier`, `description`, `label`, `type`, `unit`, `params`, `related`, `permission`, `ptype`, `accumulate`, `histogram`, `histogramUnit`


---

# 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.weka.io/6.0/getting-started-with-weka/weka-cli-overview/cli-reference-guide/weka-stats.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.
