github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/website/source/docs/commands/inspect.html.md.erb (about) 1 --- 2 layout: "docs" 3 page_title: "Commands: inspect" 4 sidebar_current: "docs-commands-inspect" 5 description: > 6 The inspect command is used to inspect a submitted job. 7 --- 8 9 # Command: inspect 10 11 The `inspect` command is used to inspect the content of a submitted job. 12 13 ## Usage 14 15 ``` 16 nomad inspect [options] <job> 17 ``` 18 19 The `inspect` command requires a single argument, a submitted job's name, and 20 will retrieve the JSON version of the job. This JSON is valid to be submitted to 21 the [Job HTTP API](/api/jobs.html). This command is useful to inspect what 22 version of a job Nomad is running. 23 24 ## General Options 25 26 <%= partial "docs/commands/_general_options" %> 27 28 ## Inspect Options 29 30 * `-version`: Display only the job at the given job version. 31 32 * `-json` : Output the job in its JSON format. 33 34 * `-t` : Format and display the job using a Go template. 35 36 ## Examples 37 38 Inspect a submitted job: 39 40 ``` 41 $ nomad inspect redis 42 { 43 "Job": { 44 "Region": "global", 45 "ID": "redis 46 "Name": "redis 47 "Type": "service", 48 "Priority": 50, 49 "AllAtOnce": false, 50 "Datacenters": [ 51 "dc1" 52 ], 53 "Constraints": [ 54 { 55 "LTarget": "${attr.kernel.name}", 56 "RTarget": "linux", 57 "Operand": "=" 58 } 59 ], 60 "TaskGroups": [ 61 { 62 "Name": "cache", 63 "Count": 1, 64 "Constraints": null, 65 "Tasks": [ 66 { 67 "Name": "redis", 68 "Driver": "docker", 69 "User": "", 70 "Config": { 71 "image": "redis:latest", 72 "port_map": [ 73 { 74 "db": 6379 75 } 76 ] 77 }, 78 "Constraints": null, 79 "Env": null, 80 "Services": [ 81 { 82 "Id": "", 83 "Name": "cache-redis", 84 "Tags": [ 85 "global", 86 "cache" 87 ], 88 "PortLabel": "db", 89 "Checks": [ 90 { 91 "Id": "", 92 "Name": "alive", 93 "Type": "tcp", 94 "Command": "", 95 "Args": null, 96 "Path": "", 97 "Protocol": "", 98 "Interval": 10000000000, 99 "Timeout": 2000000000 100 } 101 ] 102 } 103 ], 104 "Resources": { 105 "CPU": 500, 106 "MemoryMB": 256, 107 "DiskMB": 300, 108 "IOPS": 0, 109 "Networks": [ 110 { 111 "Public": false, 112 "CIDR": "", 113 "ReservedPorts": null, 114 "DynamicPorts": [ 115 { 116 "Label": "db", 117 "Value": 0 118 } 119 ], 120 "IP": "", 121 "MBits": 10 122 } 123 ] 124 }, 125 "Meta": null, 126 "KillTimeout": 5000000000, 127 "LogConfig": { 128 "MaxFiles": 10, 129 "MaxFileSizeMB": 10 130 }, 131 "Artifacts": null 132 } 133 ], 134 "RestartPolicy": { 135 "Interval": 300000000000, 136 "Attempts": 10, 137 "Delay": 25000000000, 138 "Mode": "delay" 139 }, 140 "Meta": null 141 } 142 ], 143 "Update": { 144 "Stagger": 10000000000, 145 "MaxParallel": 1 146 }, 147 "Periodic": null, 148 "Meta": null, 149 "Status": "running", 150 "StatusDescription": "", 151 "CreateIndex": 5, 152 "ModifyIndex": 7 153 } 154 } 155 ```