Out Plane

metrics

Show what applications are using right now.

read onlyrepeatable

What applications are using right now: processor, memory, and how many instances are reporting.

Every figure is per instance, because the limit is per instance too. An application running five copies at half its memory is using five halves of one limit, not two and a half limits.

Usage

outplane metrics [APP]

Arguments

ArgumentTypeDescription
APPstringApplication name or id. Omit for the whole team.

Output

FieldTypeDescription
appstring
cpuMillicoresint1000 millicores is one core.
cpuPercentint | nullAgainst the per-instance limit. null when no limit is on record, and above 100 when the app is over it.
memoryBytesintWorking set, per instance.
memoryPercentint | nullAgainst the per-instance limit.
networkInBpsfloatBytes per second received.
networkOutBpsfloatBytes per second sent.
diskReadBpsfloat
diskWriteBpsfloat
instancesintHow many instances are reporting, which is what is running. It differs from the configured count while an app is starting, stopping or partly crashed.
cpuLimitMillicoresintWhat one instance may use.
memoryLimitMbintWhat one instance may use.

Examples

What everything is using

outplane metrics

One application

outplane metrics checkout

Find what is near its limit

outplane metrics --json --fields app,cpuPercent,memoryPercent
{
  "items": [
    {
      "app": "checkout",
      "cpuPercent": 12,
      "memoryPercent": 83
    },
    {
      "app": "worker",
      "cpuPercent": 0,
      "memoryPercent": 4
    }
  ],
  "total": 2,
  "truncated": false
}

What to Know

  • Every figure is per instance, not per application: usage is averaged across the instances, because the limit is per instance too. An app running five replicas at 50% is using five halves of a limit, not 250% of one.
  • instances is what is reporting, which is not the configured replica count. app list has the configured one, and a difference between them means the app is starting, stopping or partly crashed.
  • cpuPercent and memoryPercent are null when no limit is on record, and never capped: over 100 is a real state and the most useful thing this reports.
  • An application with no running instances reports zeroes rather than being omitted, so a paused app is visible as a paused app.
  • Naming one application filters the rows, not the queries. Cost is the same whether you ask about one or all of them, so ask once rather than in a loop.
  • Rates are two-minute averages. Two calls a second apart return nearly the same numbers, and neither shows a spike that lasted seconds.
  • The text table writes bytes and rates in units a person reads. The machine formats carry the raw numbers, so nothing has to be parsed back.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of logs.no_team_slug, app.not_found, usage.empty_argument, metrics.bad_response, metrics.query_refused, context.no_team. Branch on that, or on the exit status. The message is prose and changes.

On this page