github.com/smintz/nomad@v0.8.3/website/source/docs/commands/job/status.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: job status"
     4  sidebar_current: "docs-commands-job-status"
     5  description: >
     6    Display information and status of jobs.
     7  ---
     8  
     9  # Command: job status
    10  
    11  The `job status` command displays status information for a job.
    12  
    13  ## Usage
    14  
    15  ```
    16  nomad job status [options] [job]
    17  ```
    18  
    19  This command accepts an optional job ID or prefix as the sole argument. If there
    20  is an exact match based on the provided job ID or prefix, then information about
    21  the specific job is queried and displayed. Otherwise, a list of matching jobs and
    22  information will be displayed.
    23  
    24  If the ID is omitted, the command lists out all of the existing jobs and a few of
    25  the most useful status fields for each. As of Nomad 0.7.1, alloc status also shows allocation
    26  modification time in addition to create time. When the `-verbose` flag is not set, allocation
    27  creation and modify times are shown in a shortened relative time format like `5m ago`.
    28  
    29  ## General Options
    30  
    31  <%= partial "docs/commands/_general_options" %>
    32  
    33  ## Status Options
    34  
    35  * `-all-allocs`: Display all allocations matching the job ID, even those from an
    36    older instance of the job.
    37  
    38  * `-evals`: Display the evaluations associated with the job.
    39  
    40  * `-short`: Display short output. Used only when a single node is being queried.
    41    Drops verbose node allocation data from the output.
    42  
    43  * `-verbose`: Show full information. Allocation create and modify times are shown in `yyyy/mm/dd hh:mm:ss` format.
    44  
    45  ## Examples
    46  
    47  List of all jobs:
    48  
    49  ```
    50  $ nomad job status
    51  ID       Type     Priority  Status          Submit Date
    52  job1     service  80        running         07/25/17 15:47:11 UTC
    53  job2     batch    40        complete        07/24/17 19:22:11 UTC
    54  job3     service  50        dead (stopped)  07/22/17 16:34:48 UTC
    55  ```
    56  
    57  Short view of a specific job:
    58  
    59  ```
    60  $ nomad job status -short job1
    61  ID            = job1
    62  Name          = Test Job
    63  Submit Date   = 07/25/17 15:47:11 UTC
    64  Type          = service
    65  Priority      = 3
    66  Datacenters   = dc1,dc2,dc3
    67  Status        = pending
    68  Periodic      = false
    69  Parameterized = false
    70  ```
    71  
    72  Full status information of a job:
    73  
    74  ```
    75  $ nomad job status example
    76  ID            = example
    77  Name          = example
    78  Submit Date   = 07/25/17 15:53:04 UTC
    79  Type          = service
    80  Priority      = 50
    81  Datacenters   = dc1
    82  Status        = running
    83  Periodic      = false
    84  Parameterized = false
    85  
    86  Summary
    87  Task Group  Queued  Starting  Running  Failed  Complete  Lost
    88  cache       0       0         1        0       0         0
    89  
    90  Latest Deployment
    91  ID          = 6294be0c
    92  Status      = successful
    93  Description = Deployment completed successfully
    94  
    95  Deployed
    96  Task Group  Desired  Placed  Healthy  Unhealthy
    97  cache       1        1       1        0
    98  
    99  Allocations
   100  ID        Node ID   Task Group  Version  Desired  Status   Created   Modified
   101  478ce836  5ed166e8  cache       0        run      running  5m ago    5m ago
   102  ```
   103  
   104  Full status information of a periodic job:
   105  
   106  ```
   107  $ nomad job status example
   108  ID                   = example
   109  Name                 = example
   110  Submit Date          = 07/25/17 15:59:52 UTC
   111  Type                 = batch
   112  Priority             = 50
   113  Datacenters          = dc1
   114  Status               = running
   115  Periodic             = true
   116  Parameterized        = false
   117  Next Periodic Launch = 07/25/17 16:00:30 UTC (5s from now)
   118  
   119  Children Job Summary
   120  Pending  Running  Dead
   121  0        3        0
   122  
   123  Previously Launched Jobs
   124  ID                           Status
   125  example/periodic-1500998400  running
   126  example/periodic-1500998410  running
   127  example/periodic-1500998420  running
   128  ```
   129  
   130  Full status information of a parameterized job:
   131  
   132  ```
   133  $ nomad job status example
   134  ID            = example
   135  Name          = example
   136  Submit Date   = 07/25/17 15:59:52 UTC
   137  Type          = batch
   138  Priority      = 50
   139  Datacenters   = dc1
   140  Status        = running
   141  Periodic      = false
   142  Parameterized = true
   143  
   144  Parameterized Job
   145  Payload           = required
   146  Required Metadata = foo
   147  Optional Metadata = bar
   148  
   149  Parameterized Job Summary
   150  Pending  Running  Dead
   151  0        2        0
   152  
   153  Dispatched Jobs
   154  ID                                    Status
   155  example/dispatch-1485411496-58f24d2d  running
   156  example/dispatch-1485411499-fa2ee40e  running
   157  ```
   158  
   159  Full status information of a job with placement failures:
   160  
   161  ```
   162  $ nomad job status example
   163  ID            = example
   164  Name          = example
   165  Submit Date   = 07/25/17 15:55:27 UTC
   166  Type          = service
   167  Priority      = 50
   168  Datacenters   = dc1
   169  Status        = running
   170  Periodic      = false
   171  Parameterized = false
   172  
   173  Summary
   174  Task Group  Queued  Starting  Running  Failed  Complete  Lost
   175  cache       1       0         4        0       0         0
   176  
   177  Placement Failure
   178  Task Group "cache":
   179    * Resources exhausted on 1 nodes
   180    * Dimension "cpu" exhausted on 1 nodes
   181  
   182  Latest Deployment
   183  ID          = bb4b2fb1
   184  Status      = running
   185  Description = Deployment is running
   186  
   187  Deployed
   188  Task Group  Desired  Placed  Healthy  Unhealthy
   189  cache       5        4       4        0
   190  
   191  Allocations
   192  ID        Node ID   Task Group  Version  Desired  Status   Created   Modified
   193  048c1e9e  3f38ecb4  cache       0        run      running  5m ago    5m ago
   194  250f9dec  3f38ecb4  cache       0        run      running  5m ago    5m ago
   195  2eb772a1  3f38ecb4  cache       0        run      running  5m ago    5m ago
   196  a17b7d3d  3f38ecb4  cache       0        run      running  5m ago    5m ago
   197  ```
   198  
   199  Full status information showing evaluations with a placement failure. The in
   200  progress evaluation denotes that Nomad is blocked waiting for resources to
   201  become availables so that it can place the remaining allocations.
   202  
   203  ```
   204  $ nomad job status -evals example
   205  ID            = example
   206  Name          = example
   207  Submit Date   = 07/25/17 15:55:27 UTC
   208  Type          = service
   209  Priority      = 50
   210  Datacenters   = dc1
   211  Status        = running
   212  Periodic      = false
   213  Parameterized = false
   214  
   215  Summary
   216  Task Group  Queued  Starting  Running  Failed  Complete  Lost
   217  cache       1       0         4        0       0         0
   218  
   219  Evaluations
   220  ID        Priority  Triggered By        Status    Placement Failures
   221  e44a39e8  50        deployment-watcher  canceled  false
   222  97018573  50        deployment-watcher  complete  true
   223  d5a7300c  50        deployment-watcher  canceled  false
   224  f05a4495  50        deployment-watcher  complete  true
   225  e3f3bdb4  50        deployment-watcher  canceled  false
   226  b5f08700  50        deployment-watcher  complete  true
   227  73bb867a  50        job-register        blocked   N/A - In Progress
   228  85052989  50        job-register        complete  true
   229  
   230  Placement Failure
   231  Task Group "cache":
   232    * Resources exhausted on 1 nodes
   233    * Dimension "cpu exhausted" exhausted on 1 nodes
   234  
   235  Latest Deployment
   236  ID          = bb4b2fb1
   237  Status      = running
   238  Description = Deployment is running
   239  
   240  Deployed
   241  Task Group  Desired  Placed  Healthy  Unhealthy
   242  cache       5        4       4        0
   243  
   244  Allocations
   245  ID        Node ID   Task Group  Version  Desired  Status   Created                    Modified
   246  048c1e9e  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   247  250f9dec  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   248  2eb772a1  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   249  a17b7d3d  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   250  ```