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