usertools: fix telemetry user socket path

The path to the socket when running the script as a regular user needed
to be updated to match the logic in EAL.

Fixes: 6a2967c112 ("usertools: add new telemetry script")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Ciara Power 2020-06-10 14:30:33 +01:00 committed by Thomas Monjalon
parent 1aef0aef36
commit 3b4c9d7bd6

View file

@ -78,6 +78,6 @@ def readline_complete(text, state):
for f in glob.glob('/var/run/dpdk/*/dpdk_telemetry.%s' % TELEMETRY_VERSION):
handle_socket(f)
# Path to sockets for processes run as a regular user
for f in glob.glob('/run/user/%d/dpdk/*/dpdk_telemetry.%s' %
(os.getuid(), TELEMETRY_VERSION)):
for f in glob.glob('%s/dpdk/*/dpdk_telemetry.%s' %
(os.environ.get('XDG_RUNTIME_DIR', '/tmp'), TELEMETRY_VERSION)):
handle_socket(f)