# Read an instance's graphs

> Chart an instance's processor, memory and network use over the last day, week or month.

Source: https://www.coritan.com/docs/cloud-compute/graphs/

In the dashboard:

- /dashboard/compute/…/graphs: https://www.coritan.com/dashboard/compute

The **Graphs** tab charts how hard an instance has been working: its processor and memory use, and the traffic it has received and sent. Use it to spot a busy period, to check whether the instance needs a larger size, or to confirm a spike you noticed.

## Before you begin

The graphs come from samples the instance's host records while the instance runs. Each chart point averages the samples over a stretch of time, and the stretch is longer on the longer ranges. A new instance shows its first points on the 24-hour chart before the 7-day and 30-day charts.

## Read the graphs

1. In the [dashboard](https://www.coritan.com/dashboard/compute), go to **Cloud Compute**, open the instance and select the **Graphs** tab.
2. Under **Time range**, choose **24 hours**, **7 days** or **30 days**.
3. Move the pointer over a chart to read the time and value of each point.

The tab shows four charts:

**CPU usage**
: The share of the instance's vCPUs in use, from 0 to 100%. At 100%, every vCPU is busy.

**Memory usage**
: The share of the instance's memory in use, as the host sees it. It can differ from what tools inside the instance, such as `free`, report.

**Network in**
: The traffic the instance received, in bytes per second.

**Network out**
: The traffic the instance sent, in bytes per second.

Each point is an average over its part of the range, so a short spike looks lower on the 7-day and 30-day charts than on the 24-hour chart. The newest point covers the last stretch that has ended, so it trails the present, and it trails further on the longer ranges.

## Result

The charts show the instance's use over the range you chose. For the month's total traffic against the plan's allowance, see [How instance traffic is counted](/docs/cloud-compute/traffic/).

## Troubleshooting

`No graph data yet`
: The host has no samples for the instance in this range. The instance may be new, or it may have been stopped for the whole range. Start the instance, choose **24 hours**, and reload the page later.

`Could not load the graphs`
: We could not reach the instance's host. Select **Try again**. If the error stays, [contact support](/docs/support/).

The charts show a gap
: The instance was stopped, or the host recorded no samples, for that stretch of time.

## Related

- [Use an instance's console](/docs/cloud-compute/console/) shows the instance's use right now.
- [How instance traffic is counted](/docs/cloud-compute/traffic/) explains the monthly allowance.
- [Get a different size](/docs/cloud-compute/billing/#get-a-different-size) when the instance needs more vCPU or memory.

## With the API

`GET /api/v1/client/vps/{uuid}/graphs` returns the samples for one time range. Set `timeframe` to `hour` (the default), `day`, `week`, `month` or `year`. The dashboard's **24 hours**, **7 days** and **30 days** are `day`, `week` and `month`.

```bash
curl "https://api.coritan.com/api/v1/client/vps/$INSTANCE_UUID/graphs?timeframe=day" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

The response is a list of points, oldest first. Each point has:

`time`
: The time of the sample, in Unix seconds.

`cpu`, `maxcpu`
: The share of the vCPUs in use, from `0` to `1`, and the number of vCPUs.

`mem`, `maxmem`
: The memory in use and the memory size, in bytes.

`netin`, `netout`
: The traffic received and sent, in bytes per second.

`diskread`, `diskwrite`
: The data read from and written to the disk, in bytes per second.

A point from a time when the instance was stopped can leave out the values. Any other `timeframe` answers `400` with `Invalid timeframe`.

## API

- `GET /api/v1/client/vps/{uuid}/graphs`: Get RRD graph data from Proxmox (https://www.coritan.com/docs/api/reference/client/cloud-compute/#op-get-api-v1-client-vps-uuid-graphs)
