github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/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 >>>>>>> alloc-status 111 Finished At = N/A 112 Total Restarts = 0 113 Last Restart = N/A 114 115 Recent Events: 116 07/25/17 16:12:49 UTC Started Task started by client 117 07/25/17 16:12:48 UTC Task Setup Building Task Directory 118 07/25/17 16:12:48 UTC Received Task received by client 119 ``` 120 121 Verbose status can also be accessed: 122 123 ``` 124 $ nomad alloc-status -verbose 0af996ed 125 ID = 0af996ed-aff4-8ddb-a566-e55ebf8969c9 126 Eval ID = be9bde98-0490-1beb-ced0-012d10ddf22e 127 Name = example.cache[0] 128 Node ID = 43c0b14e-7f96-e432-a7da-06605257ce0c 129 Job ID = example 130 Job Version = 0 131 Client Status = running 132 Client Description = <none> 133 Desired Status = run 134 Desired Description = <none> 135 Created = 07/25/17 16:12:48 UTC 136 Modified = 07/25/17 16:12:48 UTC 137 Deployment ID = 0c83a3b1-8a7b-136b-0e11-8383dc6c9276 138 Deployment Health = healthy 139 Replacement Alloc ID = 0bc894ca 140 Reschedule Attempts = 1/3 141 Evaluated Nodes = 1 142 Filtered Nodes = 0 143 Exhausted Nodes = 0 144 Allocation Time = 38.474µs 145 Failures = 0 146 147 Task "redis" is "running" 148 Task Resources 149 CPU Memory Disk IOPS Addresses 150 1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:27908 151 152 Task Events: 153 Started At = 07/25/17 16:12:48 UTC 154 Finished At = N/A 155 Total Restarts = 0 156 Last Restart = N/A 157 158 Recent Events: 159 Time Type Description 160 07/25/17 16:12:48 UTC Started Task started by client 161 07/25/17 16:12:48 UTC Task Setup Building Task Directory 162 07/25/17 16:12:48 UTC Received Task received by client 163 164 Task "web" is "running" 165 Task Resources 166 CPU Memory Disk IOPS Addresses 167 1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:30572 168 169 Task Events: 170 Started At = 07/25/17 16:12:49 UTC 171 Finished At = N/A 172 Total Restarts = 0 173 Last Restart = N/A 174 175 Recent Events: 176 Time Type Description 177 07/25/17 16:12:49 UTC Started Task started by client 178 07/25/17 16:12:48 UTC Task Setup Building Task Directory 179 07/25/17 16:12:48 UTC Received Task received by client 180 ```