X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=usertools%2Fdpdk-telemetry.py;h=a81868a5478984188cdf910c4f020e64f9095bec;hb=69e07f43a226499cf1ede5629616b251dae27734;hp=5b3bf83356c35a909a4d140dbf6d05c021683eb3;hpb=9055bcde19ed206df4ee1b8048048ed013bb3050;p=dpdk.git diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py index 5b3bf83356..a81868a547 100755 --- a/usertools/dpdk-telemetry.py +++ b/usertools/dpdk-telemetry.py @@ -75,9 +75,13 @@ def print_socket_options(prefix, paths): def get_dpdk_runtime_dir(fp): """ Using the same logic as in DPDK's EAL, get the DPDK runtime directory based on the file-prefix and user """ - if (os.getuid() == 0): - return os.path.join('/var/run/dpdk', fp) - return os.path.join(os.environ.get('XDG_RUNTIME_DIR', '/tmp'), 'dpdk', fp) + run_dir = os.environ.get('RUNTIME_DIRECTORY') + if not run_dir: + if (os.getuid() == 0): + run_dir = '/var/run' + else: + run_dir = os.environ.get('XDG_RUNTIME_DIR', '/tmp') + return os.path.join(run_dir, 'dpdk', fp) def list_fp():