github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/job/status.mdx (about)

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