github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/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 When ACLs are enabled, this command requires a token with the `read-job` and 31 `list-jobs` capabilities for the allocation's namespace. 32 33 ## General Options 34 35 @include 'general_options.mdx' 36 37 ## Alloc Status Options 38 39 - `-short`: Display short output. Shows only the most recent task event. 40 - `-verbose`: Show full information. 41 - `-json` : Output the allocation in its JSON format. 42 - `-t` : Format and display the allocation using a Go template. 43 44 ## Examples 45 46 Short status of an alloc: 47 48 ```shell-session 49 $ nomad alloc status --short 0af996ed 50 ID = 0af996ed 51 Eval ID = be9bde98 52 Name = example.cache[0] 53 Node ID = 43c0b14e 54 Job ID = example 55 Job Version = 0 56 Client Status = running 57 Client Description = <none> 58 Desired Status = run 59 Desired Description = <none> 60 Created At = 07/25/17 16:12:48 UTC 61 Deployment ID = 0c83a3b1 62 Deployment Health = healthy 63 64 Tasks 65 Name State Last Event Time 66 redis running Started 07/25/17 16:12:48 UTC 67 web running Started 07/25/17 16:12:49 UTC 68 ``` 69 70 Full status of an alloc, which shows one of the tasks dying and then being restarted: 71 72 ```shell-session 73 $ nomad alloc status 0af996ed 74 ID = 0af996ed 75 Eval ID = be9bde98 76 Name = example.cache[0] 77 Node ID = 43c0b14e 78 Job ID = example 79 Job Version = 0 80 Client Status = running 81 Client Description = <none> 82 Desired Status = run 83 Desired Description = <none> 84 Created = 5m ago 85 Modified = 5m ago 86 Deployment ID = 0c83a3b1 87 Deployment Health = healthy 88 Replacement Alloc ID = 0bc894ca 89 Reschedule Attempts = 1/3 90 91 Task "redis" is "running" 92 Task Resources 93 CPU Memory Disk Addresses 94 1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:27908 95 96 CSI Volumes: 97 ID Plugin Provider Schedulable Mount Options 98 vol-4150af42 ebs0 aws.ebs true <none> 99 100 Task Events: 101 Started At = 07/25/17 16:12:48 UTC 102 Finished At = N/A 103 Total Restarts = 0 104 Last Restart = N/A 105 106 Recent Events: 107 Time Type Description 108 07/25/17 16:12:48 UTC Started Task started by client 109 07/25/17 16:12:48 UTC Task Setup Building Task Directory 110 07/25/17 16:12:48 UTC Received Task received by client 111 112 Task "web" is "running" 113 Task Resources 114 CPU Memory Disk Addresses 115 1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:30572 116 117 Task Events: 118 Started At = 07/25/17 16:12:49 UTC 119 Finished At = N/A 120 Total Restarts = 0 121 Last Restart = N/A 122 123 Recent Events: 124 07/25/17 16:12:49 UTC Started Task started by client 125 07/25/17 16:12:48 UTC Task Setup Building Task Directory 126 07/25/17 16:12:48 UTC Received Task received by client 127 ``` 128 129 Verbose status can also be accessed: 130 131 ```shell-session 132 $ nomad alloc status -verbose 0af996ed 133 ID = 0af996ed-aff4-8ddb-a566-e55ebf8969c9 134 Eval ID = be9bde98-0490-1beb-ced0-012d10ddf22e 135 Name = example.cache[0] 136 Node ID = 43c0b14e-7f96-e432-a7da-06605257ce0c 137 Job ID = example 138 Job Version = 0 139 Client Status = running 140 Client Description = <none> 141 Desired Status = run 142 Desired Description = <none> 143 Created = 07/25/17 16:12:48 UTC 144 Modified = 07/25/17 16:12:48 UTC 145 Deployment ID = 0c83a3b1-8a7b-136b-0e11-8383dc6c9276 146 Deployment Health = healthy 147 Reschedule Eligibility = 2m from now 148 Evaluated Nodes = 1 149 Filtered Nodes = 0 150 Exhausted Nodes = 0 151 Allocation Time = 38.474µs 152 Failures = 0 153 154 Task "redis" is "running" 155 Task Resources 156 CPU Memory Disk Addresses 157 1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:27908 158 159 Task Events: 160 Started At = 07/25/17 16:12:48 UTC 161 Finished At = N/A 162 Total Restarts = 0 163 Last Restart = N/A 164 165 Recent Events: 166 Time Type Description 167 07/25/17 16:12:48 UTC Started Task started by client 168 07/25/17 16:12:48 UTC Task Setup Building Task Directory 169 07/25/17 16:12:48 UTC Received Task received by client 170 171 Task "web" is "running" 172 Task Resources 173 CPU Memory Disk Addresses 174 1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:30572 175 176 Task Events: 177 Started At = 07/25/17 16:12:49 UTC 178 Finished At = N/A 179 Total Restarts = 0 180 Last Restart = N/A 181 182 Recent Events: 183 Time Type Description 184 07/25/17 16:12:49 UTC Started Task started by client 185 07/25/17 16:12:48 UTC Task Setup Building Task Directory 186 07/25/17 16:12:48 UTC Received Task received by client 187 ```