Skip to content

cardano ping

Markus Läll edited this page Feb 14, 2023 · 4 revisions

Cardano-Ping

Summary

cardano-ping is a demo mux application that can be used to troubleshoot cardano-nodes. It performs version negotiation and then runs a keep-alive client towards the target node. Ping like statistics is collected. The output is either csv formatted or in json.

Source

cardano-ping

Options

  • c/count number of pings (keepalive requests) to send.
  • h/host hostname or ip address to connect to, e.g relay.iohk.example .
  • m/magic network magic to use, defaults to mainnet's magic,
  • j/json output in json format,
  • p/port portnumber to connect to, defaults to 3001.
  • q/quiet quiet flag, csv/json only output.

Example usage

cardano-ping -h 192.0.2.1 -p 3001 -q -j  -c 2 | jq
{
  "pongs": [
    {
      "cookie": 0,
      "max": 0.310088302,
      "mean": 0.310088302,
      "median": 0.310088302,
      "p90": 0.310088302,
      "min": 0.310088302,
      "host": "192.0.2.1:3001",
      "timestamp": "2021-01-20T09:32:00.159981Z",
      "sample": 0.310088302
    },
    {
      "cookie": 1,
      "max": 0.32400875,
      "mean": 0.317048526,
      "median": 0.317048526,
      "p90": 0.3226167052,
      "min": 0.310088302,
      "host": "192.0.2.1:3001",
      "timestamp": "2021-01-20T09:32:01.487895Z",
      "sample": 0.32400875
    }
  ]
}