github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/docs/commands/alloc/status.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: alloc status'
     4  sidebar_title: status
     5  description: |
     6    Display status and metadata about existing allocations and their tasks.
     7  ---
     8  
     9  # Command: alloc status
    10  
    11  The `alloc status` command displays status information and metadata
    12  about an existing allocation and its tasks. It can be useful while
    13  debugging to reveal the underlying reasons for scheduling decisions or
    14  failures, as well as the current state of its tasks. As of Nomad
    15  0.7.1, alloc status also shows allocation modification time in
    16  addition to create time. As of Nomad 0.8, alloc status shows
    17  information about reschedule attempts. As of Nomad 0.11, alloc status
    18  shows volume claims when a job claims volumes.
    19  
    20  ## Usage
    21  
    22  ```plaintext
    23  nomad alloc status [options] <allocation>
    24  ```
    25  
    26  An allocation ID or prefix must be provided. If there is an exact match, the
    27  full details of the allocation will be displayed. Otherwise, a list of matching
    28  allocations and information will be displayed.
    29  
    30  ## General Options
    31  
    32  @include 'general_options.mdx'
    33  
    34  ## Alloc Status Options
    35  
    36  - `-short`: Display short output. Shows only the most recent task event.
    37  - `-verbose`: Show full information.
    38  - `-json` : Output the allocation in its JSON format.
    39  - `-t` : Format and display the allocation using a Go template.
    40  
    41  ## Examples
    42  
    43  Short status of an alloc:
    44  
    45  ```shell-sessionnomad alloc status --short 0af996ed
    46  ID                  = 0af996ed
    47  Eval ID             = be9bde98
    48  Name                = example.cache[0]
    49  Node ID             = 43c0b14e
    50  Job ID              = example
    51  Job Version         = 0
    52  Client Status       = running
    53  Client Description  = <none>
    54  Desired Status      = run
    55  Desired Description = <none>
    56  Created At          = 07/25/17 16:12:48 UTC
    57  Deployment ID       = 0c83a3b1
    58  Deployment Health   = healthy
    59  
    60  Tasks
    61  Name   State    Last Event  Time
    62  redis  running  Started     07/25/17 16:12:48 UTC
    63  web    running  Started     07/25/17 16:12:49 UTC
    64  ```
    65  
    66  Full status of an alloc, which shows one of the tasks dying and then being restarted:
    67  
    68  ```shell-sessionnomad alloc status 0af996ed
    69  ID                   = 0af996ed
    70  Eval ID              = be9bde98
    71  Name                 = example.cache[0]
    72  Node ID              = 43c0b14e
    73  Job ID               = example
    74  Job Version          = 0
    75  Client Status        = running
    76  Client Description   = <none>
    77  Desired Status       = run
    78  Desired Description  = <none>
    79  Created              = 5m ago
    80  Modified             = 5m ago
    81  Deployment ID        = 0c83a3b1
    82  Deployment Health    = healthy
    83  Replacement Alloc ID = 0bc894ca
    84  Reschedule Attempts  = 1/3
    85  
    86  Task "redis" is "running"
    87  Task Resources
    88  CPU        Memory           Disk     Addresses
    89  1/500 MHz  6.3 MiB/256 MiB  300 MiB  db: 127.0.0.1:27908
    90  
    91  CSI Volumes:
    92  ID            Plugin  Provider  Schedulable  Mount Options
    93  vol-4150af42  ebs0    aws.ebs   true         <none>
    94  
    95  Task Events:
    96  Started At     = 07/25/17 16:12:48 UTC
    97  Finished At    = N/A
    98  Total Restarts = 0
    99  Last Restart   = N/A
   100  
   101  Recent Events:
   102  Time                   Type        Description
   103  07/25/17 16:12:48 UTC  Started     Task started by client
   104  07/25/17 16:12:48 UTC  Task Setup  Building Task Directory
   105  07/25/17 16:12:48 UTC  Received    Task received by client
   106  
   107  Task "web" is "running"
   108  Task Resources
   109  CPU        Memory           Disk     Addresses
   110  1/500 MHz  6.3 MiB/256 MiB  300 MiB  db: 127.0.0.1:30572
   111  
   112  Task Events:
   113  Started At     = 07/25/17 16:12:49 UTC
   114  Finished At    = N/A
   115  Total Restarts = 0
   116  Last Restart   = N/A
   117  
   118  Recent Events:
   119  07/25/17 16:12:49 UTC  Started     Task started by client
   120  07/25/17 16:12:48 UTC  Task Setup  Building Task Directory
   121  07/25/17 16:12:48 UTC  Received    Task received by client
   122  ```
   123  
   124  Verbose status can also be accessed:
   125  
   126  ```shell-sessionnomad alloc status -verbose 0af996ed
   127  ID                     = 0af996ed-aff4-8ddb-a566-e55ebf8969c9
   128  Eval ID                = be9bde98-0490-1beb-ced0-012d10ddf22e
   129  Name                   = example.cache[0]
   130  Node ID                = 43c0b14e-7f96-e432-a7da-06605257ce0c
   131  Job ID                 = example
   132  Job Version            = 0
   133  Client Status          = running
   134  Client Description     = <none>
   135  Desired Status         = run
   136  Desired Description    = <none>
   137  Created                = 07/25/17 16:12:48 UTC
   138  Modified               = 07/25/17 16:12:48 UTC
   139  Deployment ID          = 0c83a3b1-8a7b-136b-0e11-8383dc6c9276
   140  Deployment Health      = healthy
   141  Reschedule Eligibility = 2m from now
   142  Evaluated Nodes        = 1
   143  Filtered Nodes         = 0
   144  Exhausted Nodes        = 0
   145  Allocation Time        = 38.474µs
   146  Failures               = 0
   147  
   148  Task "redis" is "running"
   149  Task Resources
   150  CPU        Memory           Disk     Addresses
   151  1/500 MHz  6.3 MiB/256 MiB  300 MiB  db: 127.0.0.1:27908
   152  
   153  Task Events:
   154  Started At     = 07/25/17 16:12:48 UTC
   155  Finished At    = N/A
   156  Total Restarts = 0
   157  Last Restart   = N/A
   158  
   159  Recent Events:
   160  Time                   Type        Description
   161  07/25/17 16:12:48 UTC  Started     Task started by client
   162  07/25/17 16:12:48 UTC  Task Setup  Building Task Directory
   163  07/25/17 16:12:48 UTC  Received    Task received by client
   164  
   165  Task "web" is "running"
   166  Task Resources
   167  CPU        Memory           Disk     Addresses
   168  1/500 MHz  6.3 MiB/256 MiB  300 MiB  db: 127.0.0.1:30572
   169  
   170  Task Events:
   171  Started At     = 07/25/17 16:12:49 UTC
   172  Finished At    = N/A
   173  Total Restarts = 0
   174  Last Restart   = N/A
   175  
   176  Recent Events:
   177  Time                   Type        Description
   178  07/25/17 16:12:49 UTC  Started     Task started by client
   179  07/25/17 16:12:48 UTC  Task Setup  Building Task Directory
   180  07/25/17 16:12:48 UTC  Received    Task received by client
   181  ```