2015-09-27 21:20:09 +00:00
|
|
|
---
|
|
|
|
layout: "docs"
|
|
|
|
page_title: "Commands: alloc-status"
|
|
|
|
sidebar_current: "docs-commands-alloc-status"
|
|
|
|
description: >
|
2015-11-17 02:36:13 +00:00
|
|
|
Display status and metadata about existing allocations and their tasks.
|
2015-09-27 21:20:09 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Command: alloc-status
|
|
|
|
|
2015-11-17 02:36:13 +00:00
|
|
|
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.
|
2015-09-27 21:20:09 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
nomad alloc-status [options] <allocation>
|
|
|
|
```
|
|
|
|
|
2016-01-06 21:46:57 +00:00
|
|
|
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.
|
2015-09-27 21:20:09 +00:00
|
|
|
|
|
|
|
## General Options
|
|
|
|
|
|
|
|
<%= general_options_usage %>
|
2016-01-19 23:01:26 +00:00
|
|
|
|
2015-11-17 02:36:13 +00:00
|
|
|
## Status Options
|
|
|
|
|
|
|
|
* `-short`: Display short output. Shows only the most recent task event.
|
2016-01-19 23:01:26 +00:00
|
|
|
* `-verbose`: Show full information.
|
2015-09-27 21:20:09 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2015-11-17 02:36:13 +00:00
|
|
|
Short status of an alloc:
|
|
|
|
|
2015-09-27 21:20:09 +00:00
|
|
|
```
|
2016-01-19 23:01:26 +00:00
|
|
|
$ nomad alloc-status --short a7365fe4
|
|
|
|
ID = a7365fe4
|
|
|
|
EvalID = 44c2d9ed
|
2015-09-27 21:20:09 +00:00
|
|
|
Name = example.cache[0]
|
2016-01-19 23:01:26 +00:00
|
|
|
NodeID = e55859b1
|
2015-09-27 21:20:09 +00:00
|
|
|
JobID = example
|
2015-11-17 02:36:13 +00:00
|
|
|
ClientStatus = running
|
2015-09-27 21:20:09 +00:00
|
|
|
NodesEvaluated = 1
|
2015-11-17 02:36:13 +00:00
|
|
|
NodesFiltered = 0
|
2015-09-27 21:20:09 +00:00
|
|
|
NodesExhausted = 0
|
2015-11-17 02:36:13 +00:00
|
|
|
AllocationTime = 911.026µs
|
2015-09-27 21:20:09 +00:00
|
|
|
CoalescedFailures = 0
|
2015-11-17 02:36:13 +00:00
|
|
|
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
|
2015-09-27 21:20:09 +00:00
|
|
|
|
|
|
|
==> Status
|
2016-01-19 23:01:26 +00:00
|
|
|
Allocation "a7365fe4" status "running" (0/1 nodes filtered)
|
|
|
|
* Score "e55859b1.binpack" = 10.334026
|
2015-11-17 02:36:13 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Full status of an alloc, which shows one of the tasks dying and then being restarted:
|
|
|
|
|
|
|
|
```
|
2016-01-19 23:01:26 +00:00
|
|
|
$ nomad alloc-status a7365fe4
|
|
|
|
ID = a7365fe4
|
|
|
|
EvalID = 44c2d9ed
|
2015-11-17 02:36:13 +00:00
|
|
|
Name = example.cache[0]
|
2016-01-19 23:01:26 +00:00
|
|
|
NodeID = e55859b1
|
2015-11-17 02:36:13 +00:00
|
|
|
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
|
2016-01-19 23:01:26 +00:00
|
|
|
Allocation "a7365fe4" status "running" (0/1 nodes filtered)
|
2016-03-16 02:35:31 +00:00
|
|
|
* 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
|
2015-11-17 02:36:13 +00:00
|
|
|
|
2015-09-27 21:20:09 +00:00
|
|
|
```
|