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