github.com/yogeshlonkar/moby@v1.13.2-0.20201203103638-c0b64beaea94/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  $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
   113  
   114  false
   115  
   116  $ docker node inspect --pretty self
   117  ID:                     e216jshn25ckzbvmwlnh5jr3g
   118  Hostname:               swarm-manager
   119  Joined at:              2016-06-16 22:52:44.9910662 +0000 utc
   120  Status:
   121   State:                 Ready
   122   Availability:          Active
   123   Address:               172.17.0.2
   124  Manager Status:
   125   Address:               172.17.0.2:2377
   126   Raft Status:           Reachable
   127   Leader:                Yes
   128  Platform:
   129   Operating System:      linux
   130   Architecture:          x86_64
   131  Resources:
   132   CPUs:                  4
   133   Memory:                7.704 GiB
   134  Plugins:
   135    Network:              overlay, bridge, null, host, overlay
   136    Volume:               local
   137  Engine Version:         1.12.0
   138  ```
   139  
   140  ## Related commands
   141  
   142  * [node demote](node_demote.md)
   143  * [node ls](node_ls.md)
   144  * [node promote](node_promote.md)
   145  * [node ps](node_ps.md)
   146  * [node rm](node_rm.md)
   147  * [node update](node_update.md)