# How to find your allocated vCPU?

To provide a more accurate cost metric and improve pricing transparency, the PerfectScale solution is licensed by the monthly vCPU consumption of your clusters.&#x20;

{% hint style="info" %}
If your usage remains under 300 vCPU per month during your trial, you will be automatically converted to the free community package. Learn more about the Pricing model [here](https://www.perfectscale.io/pricing).
{% endhint %}

## Determine vCPU consumption

There are a few ways to determine your vCPU consumption:

[In the PerfectScale platform](#in-app)

[In your observability tool](#observability-tools)

### **In-app**

PerfectScale by DoiT has built a valuable feature that provides both the team and customers seamless access to subscription details, including visibility into normalized monthly vCPU consumption right within the platform.&#x20;

To access your license details, go to **Subscription Details**, located under the account button at the bottom left of the screen.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FZJo4P4oTCc1uz8qbOKIi%2FFrame%201000001458%20(1).png?alt=media&#x26;token=f2ff00cc-edc0-4e6a-8ca8-3c5bd6f832b9" alt=""><figcaption><p>Subscription details</p></figcaption></figure>

To view more details and track monthly vCPU consumption over time, simply click **View over-time vCPU consumption report** to access granular data in a trend report.&#x20;

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FH5saMNwECzgHSuQF0sP4%2Fimage.png?alt=media&#x26;token=10f2e5cd-382e-4150-8801-09f2d47991ab" alt=""><figcaption><p>Monthly vCPU trend</p></figcaption></figure>

### **Observability tools**

With your observability tool, like Grafana and DataDog you can either use some existing dashboard or create a new graph summarizing cluster capacity. \
\
For example, Prometheus can be used to create a visualization of cluster capacity, as shown below:

```promql
    SUM(kube_node_status_capacity{resource="cpu", unit="core"})
```

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FQI4xHTA9CaSFdPV60LWy%2Fimage.png?alt=media&#x26;token=4f138015-7e87-4e04-b57f-5376c729269e" alt=""><figcaption><p>vCPU/hours in the observability tool</p></figcaption></figure>

In the above example, the allocated vCPU is around 90 cores. We can estimate monthly core hours as `90*24*30 = 64800`

Use the terminal following the guide below:

* Open a new terminal on the machine that has `kubectl` been installed. Make sure you are running in the correct context (=cluster)
* Type the following command on the prompt:

```yaml
kubectl get nodes -o custom-columns=NAME:'{.metadata.name}',CORES:'{.status.capacity.cpu}'
```

This will show you the currently running instances and their core capacity at a single point in time:

```
NAME                                             CORES
ip-10-107-0-11.eu-central-1.compute.internal     2
ip-10-107-12-213.eu-central-1.compute.internal   2
ip-10-107-24-124.eu-central-1.compute.internal   8
ip-10-107-24-142.eu-central-1.compute.internal   2
ip-10-107-26-193.eu-central-1.compute.internal   2
ip-10-107-31-30.eu-central-1.compute.internal    8
ip-10-107-32-253.eu-central-1.compute.internal   4
ip-10-107-32-47.eu-central-1.compute.internal    4
ip-10-107-37-121.eu-central-1.compute.internal   2
ip-10-107-4-114.eu-central-1.compute.internal    2
ip-10-107-40-28.eu-central-1.compute.internal    4
ip-10-107-45-210.eu-central-1.compute.internal   2
ip-10-107-47-136.eu-central-1.compute.internal   2
ip-10-107-47-184.eu-central-1.compute.internal   4
ip-10-107-7-175.eu-central-1.compute.internal    4
ip-10-107-7-204.eu-central-1.compute.internal    2
```

* Now you can summarize the cores to have cluster cores ***`right now`***. You can multiply this number by  24\*30 to have a monthly estimate.&#x20;

{% hint style="warning" %}
If your cluster has a dynamic nature, this approach may be less accurate than Observability tools or PerfectScale.
{% endhint %}
