# Calculation of Recommendations

In this section you will learn how VirtualMetric calculates the recommendation under analysis.

## CPU Recommendation

The CPU recommendation report shows the CPU usage of devices and the recommendations provided.

<div align="center"><figure><img src="https://3741708824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbhbshAPk7P4wdrLxisUn%2Fuploads%2FITn84NS4SbXKCz2waIBt%2Fimage.png?alt=media&#x26;token=92aac020-ff59-47bd-8b9b-8e07b32d9d22" alt=""><figcaption></figcaption></figure></div>

### VM

| Metric Name       | Calculation                                                                                                                                                                                                | Statistical Operation |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| CPU Limit (MHz)   | Max Clock Speed \* Processor Count \* CPU Maximum / 100                                                                                                                                                    | MAX                   |
| CPU Usage (MHz)   | (Max Clock Speed \* Processor Count \* CPU Maximum / 100) \* Cpu Usage MHZ Percent/100                                                                                                                     | AVG                   |
| Recommended (MHz) | 1.0 / 0.6 \* Avg CPU Usage                                                                                                                                                                                 |                       |
| Reclaimed (MHz)   | Max CPU Limit - Recommended Limit MHz                                                                                                                                                                      |                       |
| Recommendation    | <p>◆ If Max CPU Limit - Recommended = 0 <strong>No Change</strong><br><br>◆ If Max CPU Limit > Recommended <strong>Decrease</strong><br><br>◆ If Max CPU Limit < Recommended <strong>Increase</strong></p> |                       |

### VMWare & Host

| Metric Name       | Calculation                                                                                                                                                                                                   | Statistical Operation |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| CPU Limit (MHz)   | Max Clock Speed \* Processor Count                                                                                                                                                                            | MAX                   |
| CPU Usage (MHz)   | Average of Cpu Usage                                                                                                                                                                                          | AVG                   |
| Recommended (MHz) | 1.0 / 0.6 \* Avg CPU Usage                                                                                                                                                                                    |                       |
| Reclaimed (MHz)   | Max CPU Limit - Recommended Limit MHz                                                                                                                                                                         |                       |
| Recommendation    | <p>◆ If Max CPU Limit - Recommended = 0, <strong>No Change</strong><br><br>◆ If Max CPU Limit > Recommended, <strong>Decrease</strong><br><br>◆ If Max CPU Limit < Recommended, <strong>Increase</strong></p> |                       |

## Memory Recommendation (VM, VMWare, Host)

The memory recommendation report shows the memory usage of devices and the recommendations provided.

<div align="center"><figure><img src="https://3741708824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbhbshAPk7P4wdrLxisUn%2Fuploads%2FKJuaUkktIHEuy2G3SpES%2Fimage.png?alt=media&#x26;token=c54e8274-ae41-42f6-b5e7-fba50ac1e955" alt=""><figcaption></figcaption></figure></div>

| Metric Name      | Calculation                                                                                                                                                                                                                           | Statistical Operation |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| Current Memory   | Memory Capacity                                                                                                                                                                                                                       | AVG                   |
| Memory Usage     | Memory Usage                                                                                                                                                                                                                          | AVG                   |
| Recommended (MB) | 1.0 / 0.6 \* Avg CPU Usage                                                                                                                                                                                                            |                       |
| Reclaimed (MB)   | Memory Capacity - Recommended Limit                                                                                                                                                                                                   |                       |
| Recommendation   | <p>◆ If Memory Capacity - Recommended Limit = 0, <strong>No Change</strong><br><br>◆ If Memory Capacity > Recommended Limit, <strong>Decrease</strong><br><br>◆ If Memory Capacity < Recommended Limit, <strong>Increase</strong></p> |                       |

## Powered off Report (VM, VMWare, Host)

The power-off report shows inactive devices and how long they have been offline.

<div align="center"><figure><img src="https://3741708824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbhbshAPk7P4wdrLxisUn%2Fuploads%2F1ecm4btB7yC3etKAGmLB%2Fimage.png?alt=media&#x26;token=127bf281-8217-4e22-ac96-e483df2159c8" alt=""><figcaption></figcaption></figure></div>

| Metric Name           | Calculation                    | Statistical Operation                                                                 |
| --------------------- | ------------------------------ | ------------------------------------------------------------------------------------- |
| Duration              | Current Date - Power Off Since |                                                                                       |
| Powered Off Since     | Epoch                          | <p>◆ When counter value returns 0, MAX<br><br>◆ When counter value returns 1, MIN</p> |
| Used Disk (MB)        | Storage Used                   | MAX                                                                                   |
| Provisioned Disk (MB) | Total Storage                  | MAX                                                                                   |

{% hint style="info" %}
All of the powered off reports have one common condition: `State = 'Off' and Record Status > 0 and Since off > 0`
{% endhint %}

## Idle Report (VM, VMWare, Host)

<div align="center"><figure><img src="https://3741708824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbhbshAPk7P4wdrLxisUn%2Fuploads%2FJwnrvjNfTeVQRY96QA96%2Fimage.png?alt=media&#x26;token=2464d9fb-828c-4797-80af-5f2e49f1c63e" alt=""><figcaption></figcaption></figure></div>

This report displays the idle machines in the environment. *VirtualMetric* checks the data from the last 14 days, and, if the ratio of hosts on a machine with

* an average CPU use below 100 MHz -or-
* an average IO use below 20 KB/s -or-
* an average network use below 1 KB/s

is greater than 90%, then it flags that machine as *idle* on the report.

| Metric Name        | Calculation                 | Statistical Operation |
| ------------------ | --------------------------- | --------------------- |
| Duration           | Current Date - Date of Idle |                       |
| Current CPU        | Avg CPU                     | AVG                   |
| Memory Used        | Storage Used                | MAX                   |
| Memory Capacity    | Total Storage               | MAX                   |
| Used Disk (MB)     | Consumed Memory             | MAX                   |
| Disk Capacity (MB) | Total Memory                | MAX                   |

{% hint style="info" %}
All idle reports have one common condition: `State = 'Running' and RecordStatus > 0`
{% endhint %}
