This topic tells you about the metrics that are emitted by all containers managed by VMware Tanzu Application Service for VMs (TAS for VMs) and its scheduling system, Diego.
App metrics include the container metrics, and any custom app metrics that developers create.
Diego containers emit resource usage metrics for the app instance. Diego averages and emits each metric every 15 seconds.
The following table describes all Diego container metrics:
Metric | Description | Unit |
---|---|---|
CpuPercentage |
CPU time used by AI as a percentage of a single CPU core. This is usually no greater than 100% * the number of vCPUs on the host Diego cell , but it may be more due to discrepancies in measurement timing. |
float64 |
AbsoluteCPUEntitlement |
CPU time that the AI was entitled to use. At minimum, the CPU time that a Diego cell provides an AI is min(app memory, 8 GB) * (Diego cell vCPUs/Diego cell memory) * 100% .The platform operator can provide the Diego cell vCPUs/memory ratio to developers.If a Diego cell is not at capacity or if other workloads on it are idle, the cell can provide more than the minimum CPU. |
uint64 |
AbsoluteCPUUsage |
CPU time used by AI.AbsoluteCPUUsage / AbsoluteCPUEntitlement calculates a 0-100% range of AI usage per entitlement. |
uint64 |
MemoryBytes |
RAM memory used by AI, in MB. | uint64 |
MemoryBytesQuota |
RAM memory available, in GB. | uint64 |
DiskBytes |
Disk space used by AI, in MB. | uint64 |
DiskBytesQuota |
Disk space available, in GB. | uint64 |
ContainerAge |
Age of container, in nanoseconds. | uint64 |
Loggregator v1: Most of the container metrics are emitted in a ContainerMetric
envelope. The AbsoluteCPUEntitlement
, AbsoluteCPUUsage
, and ContainerAge
container metrics are emitted as separate ValueMetric
envelopes.
Loggregator v2: All container metrics are emitted in gauge envelopes. The AbsoluteCPUEntitlement
, AbsoluteCPUUsage
, and ContainerAge
container metrics are emitted in a separate envelope to the other container metrics.
You can use Cloud Foundry command-line interface (cf CLI) commands to return container metrics.
You can retrieve container metrics using the Cloud Foundry Command Line Interface (cf CLI).
To retrieve CPU, memory, and disk metrics for all instances of an app, see Retrieve CPU, Memory, and Disk Metrics below.
To retrieve CPU entitlement metrics for all instances of an app, see Retrieve CPU Entitlement Metrics below.
To determine when an app has exceeded its CPU entitlement, see Monitor Apps That Exceed Their CPU Entitlement below.
To retrieve CPU, memory, and disk metrics for all instances of an app:
cf app APP-NAME
.The command output lists Diego container metric values as follows:
Label in Output | Metrics listed, as described in Diego Container Metrics, above |
---|---|
cpu |
CpuPercentage |
memory |
MemoryBytes of MemoryBytesQuota |
disk |
DiskBytes of DiskBytesQuota |
For example:
name: dora-example requested state: started routes: dora-example.bosh-lite.com last uploaded: Fri 05 Apr 10:41:21 PDT 2019 stack: cflinuxfs3 buildpacks: ruby
type: web instances: 1/1 memory usage: 256M state since cpu memory disk details
To see app instance AbsoluteCPUEntitlement
metrics from the command line:
You can use the Cloud Foundry CPU Overentitlement Plug-in to determine when an app has exceeded its CPU entitlement and might need to be scaled up.
$ cf cpu-entitlement dora-example Note: This feature is experimental. Showing CPU usage against entitlement for app dora-example in org example-org / space example-org-staging as dora@example.com ... avg usage curr usage #0 1.62% 1.66% #1 2.93% 3.09% #2 2.51% 2.62%
Important: To avoid security exposure, verify that you migrate your apps and custom buildpacks to use the cflinuxfs4
stack based on Ubuntu 22.04 LTS (Jammy Jellyfish). The cflinuxfs3
stack is based on Ubuntu 18.04 (Bionic Beaver), which reaches end of standard support in April 2023.