github.com/adityamillind98/nomad@v0.11.8/website/pages/docs/commands/job/status.mdx (about)

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