2017-08-28 23:05:58 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: job status'
|
|
|
|
sidebar_title: status
|
|
|
|
description: |
|
2017-08-28 23:05:58 +00:00
|
|
|
Display information and status of jobs.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Command: job status
|
|
|
|
|
|
|
|
The `job status` command displays status information for a job.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2017-08-28 23:05:58 +00:00
|
|
|
nomad job status [options] [job]
|
|
|
|
```
|
|
|
|
|
|
|
|
This command accepts an optional job ID or prefix as the sole argument. If there
|
|
|
|
is an exact match based on the provided job ID or prefix, then information about
|
2019-10-22 13:44:00 +00:00
|
|
|
the specific job is queried and displayed. Otherwise, a list of matching jobs
|
|
|
|
and information will be displayed.
|
2017-08-28 23:05:58 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
If the ID is omitted, the command lists out all of the existing jobs and a few
|
|
|
|
of the most useful status fields for each. As of Nomad 0.7.1, alloc status also
|
|
|
|
shows allocation modification time in addition to create time. When the
|
|
|
|
`-verbose` flag is not set, allocation creation and modify times are shown in a
|
|
|
|
shortened relative time format like `5m ago`.
|
2017-08-28 23:05:58 +00:00
|
|
|
|
2020-11-19 21:38:08 +00:00
|
|
|
When ACLs are enabled, this command requires a token with the `read-job` and
|
|
|
|
`list-jobs` capabilities for the job's namespace.
|
|
|
|
|
2017-08-28 23:05:58 +00:00
|
|
|
## General Options
|
|
|
|
|
2020-02-06 23:45:31 +00:00
|
|
|
@include 'general_options.mdx'
|
2017-08-28 23:05:58 +00:00
|
|
|
|
|
|
|
## Status Options
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-all-allocs`: Display all allocations matching the job ID, even those from an
|
2017-08-28 23:05:58 +00:00
|
|
|
older instance of the job.
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-evals`: Display the evaluations associated with the job.
|
2017-08-28 23:05:58 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-short`: Display short output. Used only when a single node is being queried.
|
2017-08-28 23:05:58 +00:00
|
|
|
Drops verbose node allocation data from the output.
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
- `-verbose`: Show full information. Allocation create and modify times are
|
|
|
|
shown in `yyyy/mm/dd hh:mm:ss` format.
|
2017-08-28 23:05:58 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
List of all jobs:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status
|
2017-08-28 23:05:58 +00:00
|
|
|
ID Type Priority Status Submit Date
|
|
|
|
job1 service 80 running 07/25/17 15:47:11 UTC
|
|
|
|
job2 batch 40 complete 07/24/17 19:22:11 UTC
|
|
|
|
job3 service 50 dead (stopped) 07/22/17 16:34:48 UTC
|
|
|
|
```
|
|
|
|
|
|
|
|
Short view of a specific job:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status -short job1
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = job1
|
|
|
|
Name = Test Job
|
|
|
|
Submit Date = 07/25/17 15:47:11 UTC
|
|
|
|
Type = service
|
|
|
|
Priority = 3
|
|
|
|
Datacenters = dc1,dc2,dc3
|
|
|
|
Status = pending
|
|
|
|
Periodic = false
|
|
|
|
Parameterized = false
|
|
|
|
```
|
|
|
|
|
|
|
|
Full status information of a job:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status example
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = example
|
|
|
|
Name = example
|
|
|
|
Submit Date = 07/25/17 15:53:04 UTC
|
|
|
|
Type = service
|
|
|
|
Priority = 50
|
|
|
|
Datacenters = dc1
|
|
|
|
Status = running
|
|
|
|
Periodic = false
|
|
|
|
Parameterized = false
|
|
|
|
|
|
|
|
Summary
|
|
|
|
Task Group Queued Starting Running Failed Complete Lost
|
|
|
|
cache 0 0 1 0 0 0
|
|
|
|
|
|
|
|
Latest Deployment
|
|
|
|
ID = 6294be0c
|
|
|
|
Status = successful
|
|
|
|
Description = Deployment completed successfully
|
|
|
|
|
|
|
|
Deployed
|
|
|
|
Task Group Desired Placed Healthy Unhealthy
|
|
|
|
cache 1 1 1 0
|
|
|
|
|
|
|
|
Allocations
|
2017-10-30 17:23:24 +00:00
|
|
|
ID Node ID Task Group Version Desired Status Created Modified
|
|
|
|
478ce836 5ed166e8 cache 0 run running 5m ago 5m ago
|
2017-08-28 23:05:58 +00:00
|
|
|
```
|
|
|
|
|
2018-03-11 18:37:05 +00:00
|
|
|
Full status information of a periodic job:
|
2017-08-28 23:05:58 +00:00
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status example
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = example
|
|
|
|
Name = example
|
|
|
|
Submit Date = 07/25/17 15:59:52 UTC
|
|
|
|
Type = batch
|
|
|
|
Priority = 50
|
|
|
|
Datacenters = dc1
|
|
|
|
Status = running
|
|
|
|
Periodic = true
|
|
|
|
Parameterized = false
|
|
|
|
Next Periodic Launch = 07/25/17 16:00:30 UTC (5s from now)
|
|
|
|
|
|
|
|
Children Job Summary
|
|
|
|
Pending Running Dead
|
|
|
|
0 3 0
|
|
|
|
|
|
|
|
Previously Launched Jobs
|
|
|
|
ID Status
|
|
|
|
example/periodic-1500998400 running
|
|
|
|
example/periodic-1500998410 running
|
|
|
|
example/periodic-1500998420 running
|
|
|
|
```
|
|
|
|
|
|
|
|
Full status information of a parameterized job:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status example
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = example
|
|
|
|
Name = example
|
|
|
|
Submit Date = 07/25/17 15:59:52 UTC
|
|
|
|
Type = batch
|
|
|
|
Priority = 50
|
|
|
|
Datacenters = dc1
|
|
|
|
Status = running
|
|
|
|
Periodic = false
|
|
|
|
Parameterized = true
|
|
|
|
|
|
|
|
Parameterized Job
|
|
|
|
Payload = required
|
|
|
|
Required Metadata = foo
|
|
|
|
Optional Metadata = bar
|
|
|
|
|
|
|
|
Parameterized Job Summary
|
|
|
|
Pending Running Dead
|
|
|
|
0 2 0
|
|
|
|
|
|
|
|
Dispatched Jobs
|
|
|
|
ID Status
|
|
|
|
example/dispatch-1485411496-58f24d2d running
|
|
|
|
example/dispatch-1485411499-fa2ee40e running
|
|
|
|
```
|
|
|
|
|
|
|
|
Full status information of a job with placement failures:
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status example
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = example
|
|
|
|
Name = example
|
|
|
|
Submit Date = 07/25/17 15:55:27 UTC
|
|
|
|
Type = service
|
|
|
|
Priority = 50
|
|
|
|
Datacenters = dc1
|
|
|
|
Status = running
|
|
|
|
Periodic = false
|
|
|
|
Parameterized = false
|
|
|
|
|
|
|
|
Summary
|
|
|
|
Task Group Queued Starting Running Failed Complete Lost
|
|
|
|
cache 1 0 4 0 0 0
|
|
|
|
|
|
|
|
Placement Failure
|
|
|
|
Task Group "cache":
|
|
|
|
* Resources exhausted on 1 nodes
|
2017-11-29 04:15:32 +00:00
|
|
|
* Dimension "cpu" exhausted on 1 nodes
|
2017-08-28 23:05:58 +00:00
|
|
|
|
|
|
|
Latest Deployment
|
|
|
|
ID = bb4b2fb1
|
|
|
|
Status = running
|
|
|
|
Description = Deployment is running
|
|
|
|
|
|
|
|
Deployed
|
|
|
|
Task Group Desired Placed Healthy Unhealthy
|
|
|
|
cache 5 4 4 0
|
|
|
|
|
|
|
|
Allocations
|
2017-10-30 17:23:24 +00:00
|
|
|
ID Node ID Task Group Version Desired Status Created Modified
|
|
|
|
048c1e9e 3f38ecb4 cache 0 run running 5m ago 5m ago
|
|
|
|
250f9dec 3f38ecb4 cache 0 run running 5m ago 5m ago
|
|
|
|
2eb772a1 3f38ecb4 cache 0 run running 5m ago 5m ago
|
|
|
|
a17b7d3d 3f38ecb4 cache 0 run running 5m ago 5m ago
|
2017-08-28 23:05:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Full status information showing evaluations with a placement failure. The in
|
|
|
|
progress evaluation denotes that Nomad is blocked waiting for resources to
|
2019-10-22 13:44:00 +00:00
|
|
|
become available so that it can place the remaining allocations.
|
2017-08-28 23:05:58 +00:00
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad job status -evals example
|
2017-08-28 23:05:58 +00:00
|
|
|
ID = example
|
|
|
|
Name = example
|
|
|
|
Submit Date = 07/25/17 15:55:27 UTC
|
|
|
|
Type = service
|
|
|
|
Priority = 50
|
|
|
|
Datacenters = dc1
|
|
|
|
Status = running
|
|
|
|
Periodic = false
|
|
|
|
Parameterized = false
|
|
|
|
|
|
|
|
Summary
|
|
|
|
Task Group Queued Starting Running Failed Complete Lost
|
|
|
|
cache 1 0 4 0 0 0
|
|
|
|
|
|
|
|
Evaluations
|
|
|
|
ID Priority Triggered By Status Placement Failures
|
|
|
|
e44a39e8 50 deployment-watcher canceled false
|
|
|
|
97018573 50 deployment-watcher complete true
|
|
|
|
d5a7300c 50 deployment-watcher canceled false
|
|
|
|
f05a4495 50 deployment-watcher complete true
|
|
|
|
e3f3bdb4 50 deployment-watcher canceled false
|
|
|
|
b5f08700 50 deployment-watcher complete true
|
|
|
|
73bb867a 50 job-register blocked N/A - In Progress
|
|
|
|
85052989 50 job-register complete true
|
|
|
|
|
|
|
|
Placement Failure
|
|
|
|
Task Group "cache":
|
|
|
|
* Resources exhausted on 1 nodes
|
|
|
|
* Dimension "cpu exhausted" exhausted on 1 nodes
|
|
|
|
|
|
|
|
Latest Deployment
|
|
|
|
ID = bb4b2fb1
|
|
|
|
Status = running
|
|
|
|
Description = Deployment is running
|
|
|
|
|
|
|
|
Deployed
|
|
|
|
Task Group Desired Placed Healthy Unhealthy
|
|
|
|
cache 5 4 4 0
|
|
|
|
|
|
|
|
Allocations
|
2017-10-30 17:23:24 +00:00
|
|
|
ID Node ID Task Group Version Desired Status Created Modified
|
|
|
|
048c1e9e 3f38ecb4 cache 0 run running 07/25/17 15:55:27 UTC 07/25/17 15:55:27 UTC
|
|
|
|
250f9dec 3f38ecb4 cache 0 run running 07/25/17 15:55:27 UTC 07/25/17 15:55:27 UTC
|
|
|
|
2eb772a1 3f38ecb4 cache 0 run running 07/25/17 15:55:27 UTC 07/25/17 15:55:27 UTC
|
|
|
|
a17b7d3d 3f38ecb4 cache 0 run running 07/25/17 15:55:27 UTC 07/25/17 15:55:27 UTC
|
2017-08-28 23:05:58 +00:00
|
|
|
```
|