usertools/telemetry: provide info on available sockets
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 14 Oct 2021 10:49:07 +0000 (11:49 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 14 Oct 2021 18:57:07 +0000 (20:57 +0200)
commitb95af1946ab4fde8489f8a91199d3b5579918997
treee4ceb0241fecfc53fa4b2db79a8ccc7d965d193f
parent11435aae2089a2bc181595a3564a33e6b7af73c6
usertools/telemetry: provide info on available sockets

When a user runs the dpdk-telemetry script and fails to connect because
the socket path does not exist, run a scan for possible sockets that
could be connected to and inform the user of the command needed to
connect to those.

For example:

  $ ./dpdk-telemetry.py -i4
  Connecting to /run/user/1000/dpdk/rte/dpdk_telemetry.v2:4
  Error connecting to /run/user/1000/dpdk/rte/dpdk_telemetry.v2:4

  Other DPDK telemetry sockets found:
  - dpdk_telemetry.v2  # Connect with './dpdk-telemetry.py'
  - dpdk_telemetry.v2:2  # Connect with './dpdk-telemetry.py -i 2'
  - dpdk_telemetry.v2:1  # Connect with './dpdk-telemetry.py -i 1'

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
usertools/dpdk-telemetry.py