Out Plane
hangar

hangar metrics

Show what Hangars are using right now.

read onlyrepeatable

What each Hangar is using right now: processor and memory against what its size allows, and how full its home disk is.

A Hangar that reaches its memory limit freezes rather than restarting, so 90% is the point to act. A paused or starting Hangar reports null rather than 0, and its disk keeps the fill it last had. This is a snapshot; the console's Overview draws the last hour.

Usage

outplane hangar metrics [HANGAR]

Arguments

ArgumentTypeDescription
HANGARstringHangar name or id. Omit for every Hangar in the team.

Output

FieldTypeDescription
hangarstring
statusstringAs hangar list reports it. Says why CPU and memory are null.
cpuMillicoresint | null1000 millicores is one core. null while nothing runs: paused, starting or stopped.
cpuPercentint | nullAgainst cpuLimitMillicores. null while nothing runs or when no limit is on record, and above 100 when the Hangar is over it.
memoryBytesint | nullWorking set. null while nothing runs.
memoryPercentint | nullAgainst memoryLimitMb. null while nothing runs or when no limit is on record. At 90 or more, act: a Hangar that reaches its limit freezes rather than restarting.
diskUsedBytesint | nullThe home disk's last measured fill, kept while the Hangar is paused. null until it has been measured.
diskPercentint | nullAgainst diskCapacityBytes.
diskCapacityBytesint | nullThe home disk's size as its file system reports it, a little under diskGb.
cpuLimitMillicoresintWhat its size allows. 0 when not on record.
memoryLimitMbintWhat its size allows. 0 when not on record.

Examples

What every Hangar is using

outplane hangar metrics

One Hangar

outplane hangar metrics myhangar

Check how close it is to its limits

outplane hangar metrics myhangar --json --fields hangar,status,memoryPercent,diskPercent
{
  "items": [
    {
      "diskPercent": 41,
      "hangar": "myhangar",
      "memoryPercent": 92,
      "status": "ready"
    }
  ],
  "total": 1,
  "truncated": false
}

What to Know

  • Cost is fixed: one API call for the Hangars, then nine instant queries on the metrics gateway for the whole team, the seven metrics runs and two for the disks. Naming one Hangar filters the rows, not the queries, so ask once rather than in a loop.
  • A paused or starting Hangar has no samples. cpuMillicores, cpuPercent, memoryBytes and memoryPercent are null for it, not 0, and status says why.
  • memoryPercent at 90 or more is the threshold to act on. A Hangar that reaches its memory limit freezes rather than restarting, and its status can go on reading ready. The text output warns under the table; the machine formats carry the number only.
  • The disk figures are the home disk's last measured fill, carried for up to seven days, so a paused Hangar still reports them. They are null for a Hangar whose disk has never been measured, such as one still starting for the first time.
  • Only the home disk is reported. Temporary storage outside it is not measured.
  • Percentages are never capped: over 100 is a real state and the most useful thing this reports.
  • The text table writes bytes 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, hangar.not_found, hangar.ambiguous, 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