github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/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-sessionnomad job status
    52  ID       Type     Priority  Status          Submit Date
    53  job1     service  80        running         07/25/17 15:47:11 UTC
    54  job2     batch    40        complete        07/24/17 19:22:11 UTC
    55  job3     service  50        dead (stopped)  07/22/17 16:34:48 UTC
    56  ```
    57  
    58  Short view of a specific job:
    59  
    60  ```shell-sessionnomad 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  ```shell-sessionnomad job status example
    75  ID            = example
    76  Name          = example
    77  Submit Date   = 07/25/17 15:53:04 UTC
    78  Type          = service
    79  Priority      = 50
    80  Datacenters   = dc1
    81  Status        = running
    82  Periodic      = false
    83  Parameterized = false
    84  
    85  Summary
    86  Task Group  Queued  Starting  Running  Failed  Complete  Lost
    87  cache       0       0         1        0       0         0
    88  
    89  Latest Deployment
    90  ID          = 6294be0c
    91  Status      = successful
    92  Description = Deployment completed successfully
    93  
    94  Deployed
    95  Task Group  Desired  Placed  Healthy  Unhealthy
    96  cache       1        1       1        0
    97  
    98  Allocations
    99  ID        Node ID   Task Group  Version  Desired  Status   Created   Modified
   100  478ce836  5ed166e8  cache       0        run      running  5m ago    5m ago
   101  ```
   102  
   103  Full status information of a periodic job:
   104  
   105  ```shell-sessionnomad job status example
   106  ID                   = example
   107  Name                 = example
   108  Submit Date          = 07/25/17 15:59:52 UTC
   109  Type                 = batch
   110  Priority             = 50
   111  Datacenters          = dc1
   112  Status               = running
   113  Periodic             = true
   114  Parameterized        = false
   115  Next Periodic Launch = 07/25/17 16:00:30 UTC (5s from now)
   116  
   117  Children Job Summary
   118  Pending  Running  Dead
   119  0        3        0
   120  
   121  Previously Launched Jobs
   122  ID                           Status
   123  example/periodic-1500998400  running
   124  example/periodic-1500998410  running
   125  example/periodic-1500998420  running
   126  ```
   127  
   128  Full status information of a parameterized job:
   129  
   130  ```shell-sessionnomad job status example
   131  ID            = example
   132  Name          = example
   133  Submit Date   = 07/25/17 15:59:52 UTC
   134  Type          = batch
   135  Priority      = 50
   136  Datacenters   = dc1
   137  Status        = running
   138  Periodic      = false
   139  Parameterized = true
   140  
   141  Parameterized Job
   142  Payload           = required
   143  Required Metadata = foo
   144  Optional Metadata = bar
   145  
   146  Parameterized Job Summary
   147  Pending  Running  Dead
   148  0        2        0
   149  
   150  Dispatched Jobs
   151  ID                                    Status
   152  example/dispatch-1485411496-58f24d2d  running
   153  example/dispatch-1485411499-fa2ee40e  running
   154  ```
   155  
   156  Full status information of a job with placement failures:
   157  
   158  ```shell-sessionnomad job status example
   159  ID            = example
   160  Name          = example
   161  Submit Date   = 07/25/17 15:55:27 UTC
   162  Type          = service
   163  Priority      = 50
   164  Datacenters   = dc1
   165  Status        = running
   166  Periodic      = false
   167  Parameterized = false
   168  
   169  Summary
   170  Task Group  Queued  Starting  Running  Failed  Complete  Lost
   171  cache       1       0         4        0       0         0
   172  
   173  Placement Failure
   174  Task Group "cache":
   175    * Resources exhausted on 1 nodes
   176    * Dimension "cpu" exhausted on 1 nodes
   177  
   178  Latest Deployment
   179  ID          = bb4b2fb1
   180  Status      = running
   181  Description = Deployment is running
   182  
   183  Deployed
   184  Task Group  Desired  Placed  Healthy  Unhealthy
   185  cache       5        4       4        0
   186  
   187  Allocations
   188  ID        Node ID   Task Group  Version  Desired  Status   Created   Modified
   189  048c1e9e  3f38ecb4  cache       0        run      running  5m ago    5m ago
   190  250f9dec  3f38ecb4  cache       0        run      running  5m ago    5m ago
   191  2eb772a1  3f38ecb4  cache       0        run      running  5m ago    5m ago
   192  a17b7d3d  3f38ecb4  cache       0        run      running  5m ago    5m ago
   193  ```
   194  
   195  Full status information showing evaluations with a placement failure. The in
   196  progress evaluation denotes that Nomad is blocked waiting for resources to
   197  become available so that it can place the remaining allocations.
   198  
   199  ```shell-sessionnomad job status -evals example
   200  ID            = example
   201  Name          = example
   202  Submit Date   = 07/25/17 15:55:27 UTC
   203  Type          = service
   204  Priority      = 50
   205  Datacenters   = dc1
   206  Status        = running
   207  Periodic      = false
   208  Parameterized = false
   209  
   210  Summary
   211  Task Group  Queued  Starting  Running  Failed  Complete  Lost
   212  cache       1       0         4        0       0         0
   213  
   214  Evaluations
   215  ID        Priority  Triggered By        Status    Placement Failures
   216  e44a39e8  50        deployment-watcher  canceled  false
   217  97018573  50        deployment-watcher  complete  true
   218  d5a7300c  50        deployment-watcher  canceled  false
   219  f05a4495  50        deployment-watcher  complete  true
   220  e3f3bdb4  50        deployment-watcher  canceled  false
   221  b5f08700  50        deployment-watcher  complete  true
   222  73bb867a  50        job-register        blocked   N/A - In Progress
   223  85052989  50        job-register        complete  true
   224  
   225  Placement Failure
   226  Task Group "cache":
   227    * Resources exhausted on 1 nodes
   228    * Dimension "cpu exhausted" exhausted on 1 nodes
   229  
   230  Latest Deployment
   231  ID          = bb4b2fb1
   232  Status      = running
   233  Description = Deployment is running
   234  
   235  Deployed
   236  Task Group  Desired  Placed  Healthy  Unhealthy
   237  cache       5        4       4        0
   238  
   239  Allocations
   240  ID        Node ID   Task Group  Version  Desired  Status   Created                    Modified
   241  048c1e9e  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   242  250f9dec  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   243  2eb772a1  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   244  a17b7d3d  3f38ecb4  cache       0        run      running  07/25/17 15:55:27 UTC      07/25/17 15:55:27 UTC
   245  ```