github.com/KyaXTeam/consul@v1.4.5/website/source/docs/commands/rtt.html.markdown.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: RTT"
     4  sidebar_current: "docs-commands-rtt"
     5  description: >
     6    The rtt command estimates the network round trip time between two nodes.
     7  ---
     8  
     9  # Consul RTT
    10  
    11  Command: `consul rtt`
    12  
    13  The `rtt` command estimates the network round trip time between two nodes using
    14  Consul's network coordinate model of the cluster.
    15  
    16  See the [Network Coordinates](/docs/internals/coordinates.html) internals guide
    17  for more information on how these coordinates are computed.
    18  
    19  ## Usage
    20  
    21  Usage: `consul rtt [options] node1 [node2]`
    22  
    23  At least one node name is required. If the second node name isn't given, it
    24  is set to the agent's node name. These are the node names as known to
    25  Consul as the `consul members` command would show, not IP addresses.
    26  
    27  #### API Options
    28  
    29  <%= partial "docs/commands/http_api_options_client" %>
    30  
    31  #### Command Options
    32  
    33  * `-wan` - Instructs the command to use WAN coordinates instead of LAN
    34    coordinates. By default, the two nodes are assumed to be nodes in the local
    35    datacenter and the LAN coordinates are used. If the -wan option is given,
    36    then the WAN coordinates are used, and the node names must be suffixed by a period
    37    and the datacenter (eg. "myserver.dc1"). It is not possible to measure between
    38    LAN coordinates and WAN coordinates, so both nodes must be in the same area.
    39  
    40  The following environment variables control accessing the HTTP server via SSL:
    41  
    42  * `CONSUL_HTTP_SSL` Set this to enable SSL
    43  * `CONSUL_HTTP_SSL_VERIFY` Set this to disable certificate checking (not recommended)
    44  
    45  ## Output
    46  
    47  If coordinates are available, the command will print the estimated round trip
    48  time between the given nodes:
    49  
    50  ```
    51  $ consul rtt n1 n2
    52  Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
    53  
    54  $ consul rtt n2 # Running from n1
    55  Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
    56  
    57  $ consul rtt -wan n1.dc1 n2.dc2
    58  Estimated n1.dc1 <-> n2.dc2 rtt: 1.275 ms (using WAN coordinates)
    59  ```