MCPcopy Create free account
hub / github.com/F-Stack/f-stack / print_socket_options

Function print_socket_options

dpdk/usertools/dpdk-telemetry.py:60–73  ·  view source on GitHub ↗

Given a set of socket paths, give the commands needed to connect

(prefix, paths)

Source from the content-addressed store, hash-verified

58
59
60def print_socket_options(prefix, paths):
61 """ Given a set of socket paths, give the commands needed to connect """
62 cmd = sys.argv[0]
63 if prefix != DEFAULT_PREFIX:
64 cmd += " -f " + prefix
65 for s in sorted(paths):
66 sock_name = os.path.basename(s)
67 if sock_name.endswith(TELEMETRY_VERSION):
68 print("- {} # Connect with '{}'".format(os.path.basename(s),
69 cmd))
70 else:
71 print("- {} # Connect with '{} -i {}'".format(os.path.basename(s),
72 cmd,
73 s.split(':')[-1]))
74
75
76def get_dpdk_runtime_dir(fp):

Callers 2

list_fpFunction · 0.85
handle_socketFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected