---
title: "ktm metrics resource-usage"
description: "Get device resource usage broken down by hour and 5-minute intervals"
sidebarTitle: "resource-usage"
lastUpdated: "2026-09-23"
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

{/* GENERATED FILE: do not edit by hand. Regenerate with: node scripts/generate.mjs */}

Get device resource usage broken down by hour and 5-minute intervals

## Usage

```bash
ktm metrics resource-usage [flags]
```

## Examples

```bash
# Hourly usage for two SIMs over one day
ktm metrics resource-usage --operator acme --resources 0612345678,0698765432 --start 2024-01-01T00:00:00Z --end 2024-01-02T00:00:00Z

# 5-minute granularity
ktm metrics resource-usage --operator acme --resources 0612345678 --aggregation 5m --start 2024-01-01T00:00:00Z --end 2024-01-01T06:00:00Z
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--aggregation` | string | `1h` | Time aggregation bucket (e.g. '1h', '5m') |
| `--end` | string |  | End time in ISO 8601 format (e.g. '2024-01-02T00:00:00Z') |
| `--operator` | string |  | Operator slug (= InfluxDB database name) |
| `--resources` | string |  | Comma-separated device IDs |
| `--start` | string |  | Start time in ISO 8601 format (e.g. '2024-01-01T00:00:00Z') |

## Details

Get device resource usage broken down by time intervals.

Returns usage percentage per resource, broken down by the specified aggregation
window (default 1h). Use for analyzing device utilization patterns over time.

This queries the "resource_usage" measurement in InfluxDB. Device IDs correspond
to resources discovered via 'ktm resources list' (SIM: national_msisdn,
web-agent: hostname, smartphone: UUID).

Maximum recommended time range: 90 days.

## Related

- [`ktm metrics`](/cli/commands/metrics)
- [`ktm resources`](/cli/commands/resources)

<Note>
  Global flags (`--output`, `--debug`, `--host`, …) apply to every command. See the [command reference overview](/cli/commands/overview).
</Note>

## What's next?

<Columns cols={2}>
  <Card title="All commands" icon="terminal" href="/cli/commands/overview">
    Browse the full CLI reference.
  </Card>
  <Card title="Get started" icon="rocket" href="/cli/getting-started">
    Install the CLI and authenticate.
  </Card>
</Columns>
