github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/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](/docs/http/job.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 * `-short`: Display short output. Used only when a single node is being queried. 31 Drops verbose node allocation data from the output. 32 33 * `-verbose`: Show full information. 34 35 ## Examples 36 37 Inspect a submitted job: 38 39 ``` 40 $ nomad inspect redis 41 { 42 "Job": { 43 "Region": "global", 44 "ID": "redis 45 "Name": "redis 46 "Type": "service", 47 "Priority": 50, 48 "AllAtOnce": false, 49 "Datacenters": [ 50 "dc1" 51 ], 52 "Constraints": [ 53 { 54 "LTarget": "${attr.kernel.name}", 55 "RTarget": "linux", 56 "Operand": "=" 57 } 58 ], 59 "TaskGroups": [ 60 { 61 "Name": "cache", 62 "Count": 1, 63 "Constraints": null, 64 "Tasks": [ 65 { 66 "Name": "redis", 67 "Driver": "docker", 68 "User": "", 69 "Config": { 70 "image": "redis:latest", 71 "port_map": [ 72 { 73 "db": 6379 74 } 75 ] 76 }, 77 "Constraints": null, 78 "Env": null, 79 "Services": [ 80 { 81 "Id": "", 82 "Name": "cache-redis", 83 "Tags": [ 84 "global", 85 "cache" 86 ], 87 "PortLabel": "db", 88 "Checks": [ 89 { 90 "Id": "", 91 "Name": "alive", 92 "Type": "tcp", 93 "Command": "", 94 "Args": null, 95 "Path": "", 96 "Protocol": "", 97 "Interval": 10000000000, 98 "Timeout": 2000000000 99 } 100 ] 101 } 102 ], 103 "Resources": { 104 "CPU": 500, 105 "MemoryMB": 256, 106 "DiskMB": 300, 107 "IOPS": 0, 108 "Networks": [ 109 { 110 "Public": false, 111 "CIDR": "", 112 "ReservedPorts": null, 113 "DynamicPorts": [ 114 { 115 "Label": "db", 116 "Value": 0 117 } 118 ], 119 "IP": "", 120 "MBits": 10 121 } 122 ] 123 }, 124 "Meta": null, 125 "KillTimeout": 5000000000, 126 "LogConfig": { 127 "MaxFiles": 10, 128 "MaxFileSizeMB": 10 129 }, 130 "Artifacts": null 131 } 132 ], 133 "RestartPolicy": { 134 "Interval": 300000000000, 135 "Attempts": 10, 136 "Delay": 25000000000, 137 "Mode": "delay" 138 }, 139 "Meta": null 140 } 141 ], 142 "Update": { 143 "Stagger": 10000000000, 144 "MaxParallel": 1 145 }, 146 "Periodic": null, 147 "Meta": null, 148 "Status": "running", 149 "StatusDescription": "", 150 "CreateIndex": 5, 151 "ModifyIndex": 7 152 } 153 } 154 ```