open-nomad/website/source/docs/commands/alloc-status.html.md.erb

96 lines
2.7 KiB
Plaintext
Raw Normal View History

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>
```
An allocation ID must be provided. This specific allocation will be queried
and detailed information for it will be dumped.
## General Options
<%= general_options_usage %>
2015-11-17 02:36:13 +00:00
#
## Status Options
* `-short`: Display short output. Shows only the most recent task event.
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
```
2015-11-17 02:36:13 +00:00
$ nomad alloc-status --short a7365fe4-8b9f-4284-612d-a101fb41e773
ID = a7365fe4-8b9f-4284-612d-a101fb41e773
EvalID = 44c2d9ed-6377-ca3d-14a8-b2e6327230ce
2015-09-27 21:20:09 +00:00
Name = example.cache[0]
2015-11-17 02:36:13 +00:00
NodeID = e55859b1-4330-f00b-da49-8a292432ead3
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
2015-11-17 02:36:13 +00:00
Allocation "a7365fe4-8b9f-4284-612d-a101fb41e773" status "running" (0/1 nodes filtered)
* Score "e55859b1-4330-f00b-da49-8a292432ead3.binpack" = 10.334026
```
Full status of an alloc, which shows one of the tasks dying and then being restarted:
```
$ nomad alloc-status a7365fe4-8b9f-4284-612d-a101fb41e773
ID = a7365fe4-8b9f-4284-612d-a101fb41e773
EvalID = 44c2d9ed-6377-ca3d-14a8-b2e6327230ce
Name = example.cache[0]
NodeID = e55859b1-4330-f00b-da49-8a292432ead3
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-8b9f-4284-612d-a101fb41e773" status "running" (0/1 nodes filtered)
* Score "e55859b1-4330-f00b-da49-8a292432ead3.binpack" = 10.334026
2015-09-27 21:20:09 +00:00
```