github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/node_inspect.md (about) 1 <!--[metadata]> 2 +++ 3 title = "node inspect" 4 description = "The node inspect command description and usage" 5 keywords = ["node, inspect"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 # node inspect 12 13 ```markdown 14 Usage: docker node inspect [OPTIONS] self|NODE [NODE...] 15 16 Display detailed information on one or more nodes 17 18 Options: 19 -f, --format string Format the output using the given go template 20 --help Print usage 21 --pretty Print the information in a human friendly format. 22 ``` 23 24 Returns information about a node. By default, this command renders all results 25 in a JSON array. You can specify an alternate format to execute a 26 given template for each result. Go's 27 [text/template](http://golang.org/pkg/text/template/) package describes all the 28 details of the format. 29 30 Example output: 31 32 $ docker node inspect swarm-manager 33 [ 34 { 35 "ID": "e216jshn25ckzbvmwlnh5jr3g", 36 "Version": { 37 "Index": 10 38 }, 39 "CreatedAt": "2016-06-16T22:52:44.9910662Z", 40 "UpdatedAt": "2016-06-16T22:52:45.230878043Z", 41 "Spec": { 42 "Role": "manager", 43 "Availability": "active" 44 }, 45 "Description": { 46 "Hostname": "swarm-manager", 47 "Platform": { 48 "Architecture": "x86_64", 49 "OS": "linux" 50 }, 51 "Resources": { 52 "NanoCPUs": 1000000000, 53 "MemoryBytes": 1039843328 54 }, 55 "Engine": { 56 "EngineVersion": "1.12.0", 57 "Plugins": [ 58 { 59 "Type": "Volume", 60 "Name": "local" 61 }, 62 { 63 "Type": "Network", 64 "Name": "overlay" 65 }, 66 { 67 "Type": "Network", 68 "Name": "null" 69 }, 70 { 71 "Type": "Network", 72 "Name": "host" 73 }, 74 { 75 "Type": "Network", 76 "Name": "bridge" 77 }, 78 { 79 "Type": "Network", 80 "Name": "overlay" 81 } 82 ] 83 } 84 }, 85 "Status": { 86 "State": "ready" 87 }, 88 "ManagerStatus": { 89 "Leader": true, 90 "Reachability": "reachable", 91 "Addr": "168.0.32.137:2377" 92 } 93 } 94 ] 95 96 $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self 97 false 98 99 $ docker node inspect --pretty self 100 ID: e216jshn25ckzbvmwlnh5jr3g 101 Hostname: swarm-manager 102 Joined at: 2016-06-16 22:52:44.9910662 +0000 utc 103 Status: 104 State: Ready 105 Availability: Active 106 Manager Status: 107 Address: 172.17.0.2:2377 108 Raft Status: Reachable 109 Leader: Yes 110 Platform: 111 Operating System: linux 112 Architecture: x86_64 113 Resources: 114 CPUs: 4 115 Memory: 7.704 GiB 116 Plugins: 117 Network: overlay, bridge, null, host, overlay 118 Volume: local 119 Engine Version: 1.12.0 120 121 ## Related information 122 123 * [node update](node_update.md) 124 * [node ps](node_ps.md) 125 * [node ls](node_ls.md) 126 * [node rm](node_rm.md)