---
title: Track usage
description: See what your app used and what it cost, from a whole organisation down to one luna, with luna usage and luna billing.
related:
  - /platform/pricing
  - /organisation/manage-billing
  - /observe/check-status
---

A bill says what a month cost, not which part of your app spent it. `luna usage` breaks the cost down from an organisation to a single luna, so you can find the type or the luna that costs the most.

## See what each luna type cost

Run [`luna usage`](/cli/usage).

```bash
luna usage
```

It shows the last 31 days of every organisation you belong to, a row for each luna type. Each row gives the cost in US dollars and the three meters the type used most, in the units they are priced in. The most costly rows come first, and a last row adds them all up.

An index has a row of its own, marked `(index)`, and a table that names each index.

## Narrow the rows

Name a project to see only its usage, and add options to narrow it further.

```bash
luna usage notes --env production --type List
```

| Option | Does |
| --- | --- |
| `PROJECT` | Only this project, by name or as `organisation/project` |
| `--org` | Only this organisation |
| `--env` | Only this environment of the project |
| `--tenant` | Only this tenant |
| `--type` | Only this luna type |
| `--luna` | Only the luna with this key, as JSON. Give `--type` with it |

## Group the rows another way

`--by` sets what each row stands for: `org`, `project`, `environment`, `tenant`, `type` or `luna`. With `--by luna`, each luna of the type has a row of its own.

```bash
luna usage notes --type List --by luna
```

Rows come 100 to a page. Pass `--limit` for up to 1,000 rows a page, or `--all` for every row.

## Choose the window

`--since` and `--until` take a length such as `24h`, a phrase such as `"2h ago"`, a time such as `2026-11-09T10:00:00Z`, or milliseconds since the epoch.

```bash
luna usage --since 2026-11-01T00:00:00Z --until 2026-11-15T00:00:00Z
```

Usage is kept by the hour, so a window covers whole hours. Over a whole month, the rows add up to what that month is charged.

## What each meter counts

| Meter | Counts |
| --- | --- |
| `requests` | Calls and messages a luna's handlers take, from an app, another luna or a schedule |
| `messages` | Messages sent to connected apps, events of a streamed response, and batches of events and table changes that listeners run |
| `streamReads` | Stream entries read for apps that follow or read a stream |
| `lunaCpuMs` | CPU time a luna's handlers use, and at least its cores for the time it has a call in flight |
| `lunaMemoryMibMs` | 128 MiB for each millisecond a luna is awake |
| `isolateCpuMs` | CPU time isolates use |
| `databaseByteHours`, `blobByteHours` | Bytes of tables and of files, for each hour they are kept |
| `historyByteHours` | Bytes of history kept for restore and fork |
| `codeByteHours` | Bytes of every deployed version of your code |
| `egressBytes`, `ingressBytes` | Bytes going out of Luna and coming in, including what your code fetches |
| `sandboxCpuMs`, `sandboxMemoryMibMs` | A sandbox's cores and memory for the time it runs |
| `sandboxDiskByteHours` | Bytes of sandbox disks kept, for each hour they are kept |

[Pricing](/platform/pricing) gives the price of each meter.

## See each day of the month

[`luna billing`](/cli/billing) shows the organisation's month a meter a row. Pass `--daily` to add what each day cost, by group of meters.

```bash
luna billing --daily
```

The groups are calls, compute, storage and sandboxes. Each day's cost is after what the plan includes and before credit. Pass `--meter` with a meter's name to see what that meter used each day, and `--month` for an earlier month.

```bash
luna billing --daily --meter requests --month 2026-11
```

The **Billing** page of the Console shows the same month.

## See what a package costs

The luna types of a package you install appear in `luna usage` under their own names. The month's cost of each package, with its usage, is under `billing.packages` in `luna billing --json`.

```bash
luna billing --json
```

:::note
Reading usage needs the `usage:read` permission, and reading billing needs `billing:read`. An API token sees only the projects it reaches, as [Automate with API tokens](/platforms/automate-with-api-tokens) explains.
:::

## Next steps

- [Pricing](/platform/pricing) shows how each meter becomes a price.
- [Manage billing](/organisation/manage-billing) sets spending limits and alerts.
- [Check status](/observe/check-status) shows one environment's cost beside its calls.
