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