github.com/fabiokung/docker@v0.11.2-0.20170222101415-4534dcd49497/docs/reference/commandline/node_inspect.md (about) 1 --- 2 title: "node inspect" 3 description: "The node inspect command description and usage" 4 keywords: "node, inspect" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # node inspect 17 18 ```markdown 19 Usage: docker node inspect [OPTIONS] self|NODE [NODE...] 20 21 Display detailed information on one or more nodes 22 23 Options: 24 -f, --format string Format the output using the given Go template 25 --help Print usage 26 --pretty Print the information in a human friendly format. 27 ``` 28 29 ## Description 30 31 Returns information about a node. By default, this command renders all results 32 in a JSON array. You can specify an alternate format to execute a 33 given template for each result. Go's 34 [text/template](http://golang.org/pkg/text/template/) package describes all the 35 details of the format. 36 37 ## Examples 38 39 ### Inspect a node 40 41 ```none 42 $ docker node inspect swarm-manager 43 44 [ 45 { 46 "ID": "e216jshn25ckzbvmwlnh5jr3g", 47 "Version": { 48 "Index": 10 49 }, 50 "CreatedAt": "2016-06-16T22:52:44.9910662Z", 51 "UpdatedAt": "2016-06-16T22:52:45.230878043Z", 52 "Spec": { 53 "Role": "manager", 54 "Availability": "active" 55 }, 56 "Description": { 57 "Hostname": "swarm-manager", 58 "Platform": { 59 "Architecture": "x86_64", 60 "OS": "linux" 61 }, 62 "Resources": { 63 "NanoCPUs": 1000000000, 64 "MemoryBytes": 1039843328 65 }, 66 "Engine": { 67 "EngineVersion": "1.12.0", 68 "Plugins": [ 69 { 70 "Type": "Volume", 71 "Name": "local" 72 }, 73 { 74 "Type": "Network", 75 "Name": "overlay" 76 }, 77 { 78 "Type": "Network", 79 "Name": "null" 80 }, 81 { 82 "Type": "Network", 83 "Name": "host" 84 }, 85 { 86 "Type": "Network", 87 "Name": "bridge" 88 }, 89 { 90 "Type": "Network", 91 "Name": "overlay" 92 } 93 ] 94 } 95 }, 96 "Status": { 97 "State": "ready", 98 "Addr": "168.0.32.137" 99 }, 100 "ManagerStatus": { 101 "Leader": true, 102 "Reachability": "reachable", 103 "Addr": "168.0.32.137:2377" 104 } 105 } 106 ] 107 ``` 108 109 ### Specify an output format 110 111 ```none 112 {% raw %} 113 $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self 114 115 false 116 117 $ docker node inspect --pretty self 118 ID: e216jshn25ckzbvmwlnh5jr3g 119 Hostname: swarm-manager 120 Joined at: 2016-06-16 22:52:44.9910662 +0000 utc 121 Status: 122 State: Ready 123 Availability: Active 124 Address: 172.17.0.2 125 Manager Status: 126 Address: 172.17.0.2:2377 127 Raft Status: Reachable 128 Leader: Yes 129 Platform: 130 Operating System: linux 131 Architecture: x86_64 132 Resources: 133 CPUs: 4 134 Memory: 7.704 GiB 135 Plugins: 136 Network: overlay, bridge, null, host, overlay 137 Volume: local 138 Engine Version: 1.12.0 139 {% endraw %} 140 ``` 141 142 ## Related commands 143 144 * [node demote](node_demote.md) 145 * [node ls](node_ls.md) 146 * [node promote](node_promote.md) 147 * [node ps](node_ps.md) 148 * [node rm](node_rm.md) 149 * [node update](node_update.md)