github.com/dkerwin/nomad@v0.3.3-0.20160525181927-74554135514b/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 <%= general_options_usage %> 29 30 ## Status Options 31 32 * `-short`: Display short output. Shows only the most recent task event. 33 * `-verbose`: Show full information. 34 35 ## Examples 36 37 Short status of an alloc: 38 39 ``` 40 $ nomad alloc-status --short 13901f26 41 ID = 13901f26 42 Eval ID = c3c9a1db 43 Name = example.cache[0] 44 Node ID = 1f029d38 45 Job ID = example 46 Client Status = running 47 48 ==> Tasks 49 Name State Last Event Time 50 redis running Started 29/03/16 03:04:53 UTC 51 web running Started 29/03/16 03:04:53 UTC 52 ``` 53 54 Full status of an alloc, which shows one of the tasks dying and then being restarted: 55 56 ``` 57 $ nomad alloc-status a7365fe4 58 ID = a7365fe4 59 Eval ID = c3c9a1db 60 Name = example.cache[0] 61 Node ID = 1f029d38 62 Job ID = example 63 Client Status = running 64 65 ==> Task Resources 66 Task: "redis" 67 CPU Memory MB Disk MB IOPS Addresses 68 500 256 300 0 db: 127.0.0.1:46321 69 70 Task: "web" 71 CPU Memory MB Disk MB IOPS Addresses 72 500 256 300 0 db: 127.0.0.1:38537 73 74 ==> Task "redis" is "running" 75 Recent Events: 76 Time Type Description 77 29/03/16 03:04:53 UTC Started Task started by client 78 29/03/16 03:04:51 UTC Received Task received by client 79 80 ==> Task "web" is "pending" 81 Recent Events: 82 Time Type Description 83 29/03/16 03:07:18 UTC Restarting Task restarting in 18.580059474s 84 29/03/16 03:07:18 UTC Terminated Exit Code: 137, Exit Message: "Docker container exited with non-zero exit code: 137" 85 29/03/16 03:04:53 UTC Started Task started by client 86 29/03/16 03:04:51 UTC Received Task received by client 87 ``` 88 89 Verbose status can also be accessed: 90 91 ``` 92 $ nomad alloc-status a7365fe4 93 ID = a7365fe4-cb28-a6e9-f3d4-f99e49c89776 94 Eval ID = c3c9a1db-dbeb-8afa-0a83-4f1b8b5a03f5 95 Name = example.cache[0] 96 Node ID = 1f029d38-8d4b-a552-261f-e457b60f9b4b 97 Job ID = example 98 Client Status = running 99 Evaluated Nodes = 1 100 Filtered Nodes = 0 101 Exhausted Nodes = 0 102 Allocation Time = 1.085001ms 103 Failures = 0 104 105 ==> Task Resources 106 Task: "web" 107 CPU Memory MB Disk MB IOPS Addresses 108 500 256 300 0 db: 127.0.0.1:38537 109 110 Task: "redis" 111 CPU Memory MB Disk MB IOPS Addresses 112 500 256 300 0 db: 127.0.0.1:46321 113 114 ==> Task "redis" is "running" 115 Recent Events: 116 Time Type Description 117 29/03/16 03:04:53 UTC Started Task started by client 118 29/03/16 03:04:51 UTC Received Task received by client 119 120 ==> Task "web" is "running" 121 Recent Events: 122 Time Type Description 123 29/03/16 03:07:38 UTC Started Task started by client 124 29/03/16 03:07:18 UTC Restarting Task restarting in 18.580059474s 125 29/03/16 03:07:18 UTC Terminated Exit Code: 137, Exit Message: "Docker container exited with non-zero exit code: 137" 126 29/03/16 03:04:53 UTC Started Task started by client 127 29/03/16 03:04:51 UTC Received Task received by client 128 129 ==> Status 130 Allocation "13901f26-cb28-a6e9-f3d4-f99e49c89776" status "running" (0/1 nodes filtered) 131 * Score "1f029d38-8d4b-a552-261f-e457b60f9b4b.binpack" = 10.334026 132 ```