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