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

133 lines
3.8 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 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-03-29 19:36:24 +00:00
$ nomad alloc-status --short 13901f26
ID = 13901f26
Eval ID = c3c9a1db
Name = example.cache[0]
Node ID = 1f029d38
Job ID = example
Client Status = running
2015-11-17 02:36:13 +00:00
==> Tasks
2016-03-29 19:36:24 +00:00
Name State Last Event Time
redis running Started 29/03/16 03:04:53 UTC
web running Started 29/03/16 03:04:53 UTC
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
2016-03-29 19:36:24 +00:00
ID = a7365fe4
Eval ID = c3c9a1db
Name = example.cache[0]
Node ID = 1f029d38
Job ID = example
Client Status = running
==> Task Resources
Task: "redis"
CPU Memory MB Disk MB IOPS Addresses
500 256 300 0 db: 127.0.0.1:46321
Task: "web"
CPU Memory MB Disk MB IOPS Addresses
500 256 300 0 db: 127.0.0.1:38537
2015-11-17 02:36:13 +00:00
==> Task "redis" is "running"
Recent Events:
2016-03-29 19:36:24 +00:00
Time Type Description
29/03/16 03:04:53 UTC Started Task started by client
29/03/16 03:04:51 UTC Received Task received by client
2015-11-17 02:36:13 +00:00
2016-03-29 19:36:24 +00:00
==> Task "web" is "pending"
2015-11-17 02:36:13 +00:00
Recent Events:
2016-03-29 19:36:24 +00:00
Time Type Description
29/03/16 03:07:18 UTC Restarting Task restarting in 18.580059474s
29/03/16 03:07:18 UTC Terminated Exit Code: 137, Exit Message: "Docker container exited with non-zero exit code: 137"
29/03/16 03:04:53 UTC Started Task started by client
29/03/16 03:04:51 UTC Received Task received by client
```
2015-11-17 02:36:13 +00:00
2016-03-29 19:36:24 +00:00
Verbose status can also be accessed:
```
$ nomad alloc-status a7365fe4
ID = a7365fe4-cb28-a6e9-f3d4-f99e49c89776
Eval ID = c3c9a1db-dbeb-8afa-0a83-4f1b8b5a03f5
Name = example.cache[0]
Node ID = 1f029d38-8d4b-a552-261f-e457b60f9b4b
Job ID = example
Client Status = running
Evaluated Nodes = 1
Filtered Nodes = 0
Exhausted Nodes = 0
Allocation Time = 1.085001ms
Failures = 0
==> Task Resources
2016-03-29 19:36:24 +00:00
Task: "web"
CPU Memory MB Disk MB IOPS Addresses
2016-03-29 19:36:24 +00:00
500 256 300 0 db: 127.0.0.1:38537
2016-03-29 19:36:24 +00:00
Task: "redis"
CPU Memory MB Disk MB IOPS Addresses
2016-03-29 19:36:24 +00:00
500 256 300 0 db: 127.0.0.1:46321
2015-11-17 02:36:13 +00:00
2016-03-29 19:36:24 +00:00
==> Task "redis" is "running"
Recent Events:
Time Type Description
29/03/16 03:04:53 UTC Started Task started by client
29/03/16 03:04:51 UTC Received Task received by client
==> Task "web" is "running"
Recent Events:
Time Type Description
29/03/16 03:07:38 UTC Started Task started by client
29/03/16 03:07:18 UTC Restarting Task restarting in 18.580059474s
29/03/16 03:07:18 UTC Terminated Exit Code: 137, Exit Message: "Docker container exited with non-zero exit code: 137"
29/03/16 03:04:53 UTC Started Task started by client
29/03/16 03:04:51 UTC Received Task received by client
==> Status
Allocation "13901f26-cb28-a6e9-f3d4-f99e49c89776" status "running" (0/1 nodes filtered)
* Score "1f029d38-8d4b-a552-261f-e457b60f9b4b.binpack" = 10.334026
2015-09-27 21:20:09 +00:00
```