1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2020 Intel Corporation.
5 DPDK Telemetry User Guide
6 =========================
8 The Telemetry library provides users with the ability to query DPDK for
9 telemetry information, currently including information such as ethdev stats,
10 ethdev port list, and eal parameters.
16 The :doc:`../prog_guide/telemetry_lib` opens a socket with path
17 *<runtime_directory>/dpdk_telemetry.<version>*. The version represents the
18 telemetry version, the latest is v2. For example, a client would connect to a
19 socket with path */var/run/dpdk/\*/dpdk_telemetry.v2* (when the primary process
20 is run by a root user).
23 Telemetry Initialization
24 ------------------------
26 The library is enabled by default, however an EAL flag to enable the library
27 exists, to provide backward compatibility for the previous telemetry library
32 A flag exists to disable Telemetry also::
40 The following steps show how to run an application with telemetry support,
41 and query information using the telemetry client python script.
43 #. Launch testpmd as the primary application with telemetry::
47 #. Launch the telemetry client script::
49 ./usertools/dpdk-telemetry.py
51 #. When connected, the script displays the following, waiting for user input::
53 Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
54 {"version": "DPDK 20.05.0-rc2", "pid": 60285, "max_output_len": 16384}
57 #. The user can now input commands to send across the socket, and receive the
58 response. Some available commands are shown below.
63 {"/": ["/", "/eal/app_params", "/eal/params", "/ethdev/list",
64 "/ethdev/link_status", "/ethdev/xstats", "/help", "/info"]}
66 * Get the list of ethdev ports::
69 {"/ethdev/list": [0, 1]}
73 For commands that expect a parameter, use "," to separate the command
74 and parameter. See examples below.
76 * Get extended statistics for an ethdev port::
79 {"/ethdev/xstats": {"rx_good_packets": 0, "tx_good_packets": 0,
80 "rx_good_bytes": 0, "tx_good_bytes": 0, "rx_missed_errors": 0,
82 "tx_priority7_xon_to_xoff_packets": 0}}
84 * Get the help text for a command. This will indicate what parameters are
85 required. Pass the command as a parameter::
87 --> /help,/ethdev/xstats
88 {"/help": {"/ethdev/xstats": "Returns the extended stats for a port.
89 Parameters: int port_id"}}