open-nomad/website/source/docs/commands/alloc-status.html.md.erb
2016-03-15 19:35:31 -07:00

107 lines
2.7 KiB
Plaintext

---
layout: "docs"
page_title: "Commands: alloc-status"
sidebar_current: "docs-commands-alloc-status"
description: >
Display status and metadata about existing allocations and their tasks.
---
# Command: alloc-status
The `alloc-status` command displays status information and metadata about an
existing allocation and its tasks. It can be useful while debugging to reveal
the underlying reasons for scheduling decisions or failures, as well as the
current state of its tasks.
## Usage
```
nomad alloc-status [options] <allocation>
```
An allocation ID or prefix must be provided. If there is an exact match, the
full details of the allocation will be displayed. Otherwise, a list of matching
allocations and information will be displayed.
## General Options
<%= general_options_usage %>
## Status Options
* `-short`: Display short output. Shows only the most recent task event.
* `-verbose`: Show full information.
## Examples
Short status of an alloc:
```
$ nomad alloc-status --short a7365fe4
ID = a7365fe4
EvalID = 44c2d9ed
Name = example.cache[0]
NodeID = e55859b1
JobID = example
ClientStatus = running
NodesEvaluated = 1
NodesFiltered = 0
NodesExhausted = 0
AllocationTime = 911.026µs
CoalescedFailures = 0
redis
web
==> Tasks
Name State LastEvent Time
redis running Started 02:29:40 11/17/15
web running Started 02:30:41 11/17/15
==> Status
Allocation "a7365fe4" status "running" (0/1 nodes filtered)
* Score "e55859b1.binpack" = 10.334026
```
Full status of an alloc, which shows one of the tasks dying and then being restarted:
```
$ nomad alloc-status a7365fe4
ID = a7365fe4
EvalID = 44c2d9ed
Name = example.cache[0]
NodeID = e55859b1
JobID = example
ClientStatus = running
NodesEvaluated = 1
NodesFiltered = 0
NodesExhausted = 0
AllocationTime = 911.026µs
CoalescedFailures = 0
==> Task "redis" is "running"
Recent Events:
Time Type Description
02:29:40 11/17/15 Started <none>
==> Task "web" is "running"
Recent Events:
Time Type Description
02:30:41 11/17/15 Started <none>
02:30:02 11/17/15 Terminated Exit Code: 137, Exit Message: "Docker container exited with non-zero exit code: 137"
02:29:40 11/17/15 Started <none>
==> Status
Allocation "a7365fe4" status "running" (0/1 nodes filtered)
* Score "e55859b1.binpack" = 10.334026
==> Task Resources
Task: "redis"
CPU Memory MB Disk MB IOPS Addresses
500 256 300 0 db: 127.0.0.1:52004
Task: "web"
CPU Memory MB Disk MB IOPS Addresses
500 256 300 0 http: 127.0.0.1:52007
```