What can I help you with?
DOCA Documentation v3.0.0

DOCA Telemetry Service Guide

This guide provides instructions on how to use the DOCA Telemetry Service (DTS) container on top of hosts or NVIDIA® BlueField® DPU.

New Features

  1. Added host image for aarch64 servers

  2. Introduce Real Time Analytics (RTA) Exporter

  3. Introduce Virtual NIC Counters Provider

  4. Introduce high frequency telemetry REST API

  5. Support Multirate export of telemetry to Open Telemetry receivers using loadbalancer

Bug Fixes

  1. Updated default configuration of counterset folder location

  2. Fixed default field indexes to perform exact string match in dts_config.ini

Deprecations and Removals

  1. hcaperf provider will be removed starting with DOCA 3.2.0

DOCA Telemetry Service (DTS) provides real-time system and workload metrics for BlueField platforms and supported host systems from built-in providers and from external telemetry applications.

DTS supports the following providers:

  • Data providers:

    • Sysfs

    • Ethtool

    • Advanced monitoring and bringup errors (amber)

    • Port programmable congestion control (ppcc_eth)

    • Diagnostic data

    • Ifconfig

    • RDMA notifications

    • Data center GPU manager (DCGM)

    • NVIDIA System Management Interface (nvidia-smi)

    • BlueField performance (bfperf)

    • TC (traffic control)

  • Aggregation providers:

    • Fluent aggregator

    • Prometheus aggregator

Note

Sysfs provider is enabled by default on BlueField.

Data Storage

DTS stores collected data in binary files located at /opt/mellanox/doca/services/telemetry/data directory. By default, data writing is disabled.

Data Export Options

DTS supports the following export mechanisms:

  • Prometheus Endpoint (pull)

  • Fluent Bit (push)

  • OpenTelemetry (push)

  • Prometheus Remote Write (push)

NetFlow Packet Export

DTS can export NetFlow packets when data is collected using the DOCA Telemetry Exporter NetFlow API client application.

To enable the NetFlow exporter, configure the dts_config.ini file with the NetFlow collector IP/address and port.

DTS is available as a built-in service on BlueField DPUs and as a container image on NVIDIA NGC for hosts.

Built-in DOCA Service Image (BlueField)

DOCA Telemetry Service is included by default in the BlueField DPU image. Each DPU image ships with a fixed version of the service, providing out-of-the-box support for applications using the DOCA Telemetry library.

TelemetryAgent-programmer-guide-version-1-modificationdate-1739110164983-api-v2.png

DOCA Service on NGC

In addition to the built-in image, updated DTS versions are available on NVIDIA NGC. This is useful if you need to upgrade to a newer version than the one bundled with the BlueField OS. Refer to the container's NGC page for service-specific configuration and deployment steps.

Info

For more information about the deployment of DOCA containers on top of the BlueField DPU, refer to NVIDIA DOCA Container Deployment Guide.


DPU Deployment

On BlueField DPUs, DTS starts automatically during boot using the configuration defined in:

Copy
Copied!
            

/etc/kubelet.d/doca_telemetry_standalone.yaml

  • To disable auto-start, remove the YAML file from this path

  • Changes to the YAML file are applied on system restart

DTS file location: /opt/mellanox/doca/services/telemetry/

  • Container volume mounts:

    • config/

    • data/

    • ipc_sockets/

  • Backup artifacts:

    • doca_telemetry_service_${version}_arm64.tar.gz – DTS container image

    • doca_telemetry_standalone.yaml – backup of the default boot YAML

Host Deployment

DTS supports deployment on x86_64 and aarch64 host architectures. All exporters and providers run from a single Docker container.

  1. Initialize and configure host DTS with the desired DTS version:

    Copy
    Copied!
                

    export DTS_IMAGE=nvcr.io/nvidia/doca/doca_telemetry:<desired-DTS-host-version> docker run -v "/opt/mellanox/doca/services/telemetry/config:/config" --rm --name doca-telemetry-init -it $DTS_IMAGE /bin/bash -c "DTS_CONFIG_DIR=host /usr/bin/telemetry-init.sh"

    Note

    NGC does not support the latest tag. You must specify a full versioned tag (e.g., 1.16.5-doca2.6.0-host).

    Copy
    Copied!
                

    export DTS_IMAGE=nvcr.io/nvidia/doca/doca_telemetry:1.16.5-doca2.6.0-host

    Info

    The purpose of telemetry-init.sh is to populate the config/ directory. If this directory already contains configuration files, the script is a no-op. When upgrading, mount an alternate directory to add new configuration files as needed.

  2. Launch the DTS container:

    Copy
    Copied!
                

    docker run -d --net=host --uts=host --ipc=host \ --privileged \ --ulimit stack=67108864 --ulimit memlock=-1 \ --device=/dev/mst/ \ --device=/dev/infiniband/ \ --gpus all \ -v "/opt/mellanox/doca/services/telemetry/config:/config" \ -v "/opt/mellanox/doca/services/telemetry/ipc_sockets:/tmp/ipc_sockets" \ -v "/opt/mellanox/doca/services/telemetry/data:/data" \ -v "/usr/lib64/mft:/usr/lib64/mft" \ --rm --name doca-telemetry -it $DTS_IMAGE /usr/bin/telemetry-run.sh

    Note

    If GPU devices are not properly detected by the driver, remove --gpus all from the command.

    Note

    Required mounts per service:

    Service Component

    Required Flags

    GPU providers (nvidia_smi, dcgm)

    --gpus all

    amber, ppcc_eth, hcaperf

    --device=/dev/mst/

    -v "/usr/lib64/mft:/usr/lib64/mft"

    hcaperf (additional)

    -v "/sys/kernel/debug:/sys/kernel/debug"

    UCX/RDMA modes

    --device=/dev/infiniband/

    Collection logs are available at /var/log/clx.log*. To persist logs on the host, mount a host folder using:

    Copy
    Copied!
                

    -v /opt/mellanox/doca/services/telemetry/log:/var/log

Deployment with Grafana Monitoring

For information on integrating DTS with Grafana dashboards, refer to the section "Deploying with Grafana Monitoring".

DTS configuration is located at /opt/mellanox/doca/services/telemetry/config.

This directory is initialized during service startup. It contains the main configuration file (dts_config.ini) and a folder for Fluent Bit configuration (fluent_bit_configs). The dts_config.ini file is used to control telemetry provider behavior, exporter settings, sampling rates, and data output. Fluent Bit integration is discussed separately in the Fluent Bit section.

Note

Any changes to dts_config.ini automatically trigger a DTS restart within 60 seconds to apply updates.

Initialization Scripts (BlueField Deployment)

The DTS container’s initContainers section of the .yaml file executes two initialization scripts:

  • /usr/bin/telemetry-init.sh – Generates default configuration files only if the config directory is empty

  • /usr/bin/enable-fluent-forward.sh – Configures the Fluent Bit forwarding destination (host and port). This script only runs when both parameters are provided and will overwrite the fluent_bit_configs directory with a new .exp configuration file.

Enabling Fluent Bit Forwarding

To enable Fluent Bit forwarding, add the destination IP and port to the command line in the initContainers section of your deployment YAML:

Copy
Copied!
            

command: ["/bin/bash", "-c", "/usr/bin/telemetry-init.sh && /usr/bin/enable-fluent-forward.sh -i=127.0.0.1 -p=24224"]

Note

The IP and port shown above are examples. See the "Fluent Bit" section for manual configuration guidance.


Generating Configuration

The config directory starts empty by default. The initialization process will generate default configuration files during first launch.

Resetting Configuration

To reset DTS to its default state:

  1. Delete all files from /opt/mellanox/doca/services/telemetry/config/.

  2. Restart the DTS container to regenerate default configuration files.

Sampling Interval

The sampling interval for most telemetry providers is controlled by the update parameter in dts_config.ini:

Copy
Copied!
            

# Sampling interval for providers (milliseconds) update=1000

Note

Export frequency may differ due to internal buffer logic. Data is exported once a page of counters is filled. You can enforce a time-based flush using the sync-time-limit parameter:

Copy
Copied!
            

# Timeout for forced page rotation in seconds sync-time-limit=10000


Enabling Providers

To enable a telemetry provider, uncomment its enable-provider line in dts_config.ini. For example:

Copy
Copied!
            

enable-provider=ethtool

Note

See the "Providers" section for a full list of available telemetry providers.

Remote Collection (BlueField Only)

Some providers may not function correctly within a container and require remote execution. Enable this mode as follows:

  1. Start the DOCA privileged executor (DPE):

    Copy
    Copied!
                

    systemctl start dpe

  2. Prefix the provider name with grpc.. For example, the following line configures remote collection of the hcaperf provider:

    Copy
    Copied!
                

    enable-provider=grpc.hcaperf

  3. For provider-specific configuration, apply the same prefix. Building upon the previous example:

    Copy
    Copied!
                

    grpc.hcaperf.mlx5_0=sample grpc.hcaperf.mlx5_1=sample 

Enabling Data Output

To enable writing collected data to disk, uncomment the following line in dts_config.ini:

Copy
Copied!
            

output=/data


Enabling IPC with External Applications

To enable inter-process communication (IPC) between DTS and a non-containerized application, refer to the section "Using IPC with Non-container Application" in DOCA Telemetry Exporter.

Level Labels

DTS supports metadata labels for telemetry exporters such as Prometheus and OpenTelemetry. Labels can be configured globally or per device, and are defined in /opt/mellanox/doca/services/telemetry/config/level_labels.ini.

Sample level_labels.ini

The following is an example level_labels.ini file, defining global and per-device labels:

Copy
Copied!
            

# lines starting with hash are ignored # 2 level labels are supported - global and device # global labels will be added to all metrics # device labels will be added to metrics matching the device description   [global_labels] # global labels to be added to all metrics # format: # label_name=label_value hostname=myhost ip=127.127.127.127   [device_labels] # device labels will be added to metrics related to the device # format: # device_index_label=device_label_name1|device_label_value1|device_label_name2|device_label_value2 mlx5_0=rail|0|network|compute mlx5_1=rail|1|network|compute mlx5_2=rail|2|network|storage   [device_mapping] # optional: mapping of device names to network interfaces and mst devices # this is done internally by DTS, but can be overridden here # add clear_auto_detected_mapping=true to clear the auto-detected mapping # format: # device_name=mst_device_name|net_interface_names # in case of multiple net interfaces, separate them with comma   [data_types_mapping] # internal data types, don't change this section if you don't know what you are doing # format: # data_type|index|device_type_name ethtool_event=device_name|netif ppcc_eth=device_name|mst ifconfig_event=device_name|netif


Enabling Level Labels

  1. Confirm that level_labels.ini is properly configured.

  2. Add the following line to dts_config.ini:

    Copy
    Copied!
                

    level-labels-file=/config/level_labels.ini

Monitoring and Reloading

DTS continuously monitors level_labels.ini. When a change is detected:

  • The current telemetry process exits automatically

  • DTS restarts within 60 seconds and loads the updated labels

This ensures label changes take effect without requiring manual restarts.

Providers

DTS supports on-board data collection from sysf, ethtool, and tc providers. Fluent and Prometheus aggregator providers can collect the data from other applications.

Other providers are available based on different conditions (e.g., specific container mounts or host only such as amber, ppcc_eth, etc). Such providers are described with their dependencies in their corresponding sections.

Sysfs Counters List

The sysfs provider has several components: ib_port, hw_port, mr_cache, eth, hwmon and bf_ptm. By default, all the components (except bf_ptm) are enabled when the provider is enabled:

Copy
Copied!
            

#disable-provider=sysfs

The components can be disabled separately. For instance, to disable eth:

Copy
Copied!
            

enable-provider=sysfs disable-provider=sysfs.eth

Note

ib_port and ib_hvw are state counters which are collected per port. These counters are only collected for ports whose state is active.

  • ib_port counters:

    Copy
    Copied!
                

    {hca_name}:{port_num}:ib_port_state {hca_name}:{port_num}:VL15_dropped {hca_name}:{port_num}:excessive_buffer_overrun_errors {hca_name}:{port_num}:link_downed {hca_name}:{port_num}:link_error_recovery {hca_name}:{port_num}:local_link_integrity_errors {hca_name}:{port_num}:multicast_rcv_packets {hca_name}:{port_num}:multicast_xmit_packets {hca_name}:{port_num}:port_rcv_constraint_errors {hca_name}:{port_num}:port_rcv_data {hca_name}:{port_num}:port_rcv_errors {hca_name}:{port_num}:port_rcv_packets {hca_name}:{port_num}:port_rcv_remote_physical_errors {hca_name}:{port_num}:port_rcv_switch_relay_errors {hca_name}:{port_num}:port_xmit_constraint_errors {hca_name}:{port_num}:port_xmit_data {hca_name}:{port_num}:port_xmit_discards {hca_name}:{port_num}:port_xmit_packets {hca_name}:{port_num}:port_xmit_wait {hca_name}:{port_num}:symbol_error {hca_name}:{port_num}:unicast_rcv_packets {hca_name}:{port_num}:unicast_xmit_packets

  • ib_hw counters:

    Copy
    Copied!
                

    {hca_name}:{port_num}:hw_state {hca_name}:{port_num}:hw_duplicate_request {hca_name}:{port_num}:hw_implied_nak_seq_err {hca_name}:{port_num}:hw_lifespan {hca_name}:{port_num}:hw_local_ack_timeout_err {hca_name}:{port_num}:hw_out_of_buffer {hca_name}:{port_num}:hw_out_of_sequence {hca_name}:{port_num}:hw_packet_seq_err {hca_name}:{port_num}:hw_req_cqe_error {hca_name}:{port_num}:hw_req_cqe_flush_error {hca_name}:{port_num}:hw_req_remote_access_errors {hca_name}:{port_num}:hw_req_remote_invalid_request {hca_name}:{port_num}:hw_resp_cqe_error {hca_name}:{port_num}:hw_resp_cqe_flush_error {hca_name}:{port_num}:hw_resp_local_length_error {hca_name}:{port_num}:hw_resp_remote_access_errors {hca_name}:{port_num}:hw_rnr_nak_retry_err {hca_name}:{port_num}:hw_rx_atomic_requests {hca_name}:{port_num}:hw_rx_dct_connect {hca_name}:{port_num}:hw_rx_icrc_encapsulated {hca_name}:{port_num}:hw_rx_read_requests {hca_name}:{port_num}:hw_rx_write_requests

  • ib_mr_cache counters:

    Copy
    Copied!
                

    {hca_name}:mr_cache:size_{n}:cur {hca_name}:mr_cache:size_{n}:limit {hca_name}:mr_cache:size_{n}:miss {hca_name}:mr_cache:size_{n}:size

    Note

    Where n ranges from 0 to 24.

  • eth counters:

    Copy
    Copied!
                

    {hca_name}:{device_name}:eth_collisions {hca_name}:{device_name}:eth_multicast {hca_name}:{device_name}:eth_rx_bytes {hca_name}:{device_name}:eth_rx_compressed {hca_name}:{device_name}:eth_rx_crc_errors {hca_name}:{device_name}:eth_rx_dropped {hca_name}:{device_name}:eth_rx_errors {hca_name}:{device_name}:eth_rx_fifo_errors {hca_name}:{device_name}:eth_rx_frame_errors {hca_name}:{device_name}:eth_rx_length_errors {hca_name}:{device_name}:eth_rx_missed_errors {hca_name}:{device_name}:eth_rx_nohandler {hca_name}:{device_name}:eth_rx_over_errors {hca_name}:{device_name}:eth_rx_packets {hca_name}:{device_name}:eth_tx_aborted_errors {hca_name}:{device_name}:eth_tx_bytes {hca_name}:{device_name}:eth_tx_carrier_errors {hca_name}:{device_name}:eth_tx_compressed {hca_name}:{device_name}:eth_tx_dropped {hca_name}:{device_name}:eth_tx_errors {hca_name}:{device_name}:eth_tx_fifo_errors {hca_name}:{device_name}:eth_tx_heartbeat_errors {hca_name}:{device_name}:eth_tx_packets {hca_name}:{device_name}:eth_tx_window_errors

  • devices counters

    Copy
    Copied!
                

    {hca_name}:current_link_width {hca_name}:current_link_speed {hca_name}:max_link_speed {hca_name}:max_link_width

  • BlueField-2 hwmon counters:

    Copy
    Copied!
                

    {hwmon_name}:{l3cache}:CYCLES {hwmon_name}:{l3cache}:HITS_BANK0 {hwmon_name}:{l3cache}:HITS_BANK1 {hwmon_name}:{l3cache}:MISSES_BANK0 {hwmon_name}:{l3cache}:MISSES_BANK1 {hwmon_name}:{pcie}:IN_C_BYTE_CNT {hwmon_name}:{pcie}:IN_C_PKT_CNT {hwmon_name}:{pcie}:IN_NP_BYTE_CNT {hwmon_name}:{pcie}:IN_NP_PKT_CNT {hwmon_name}:{pcie}:IN_P_BYTE_CNT {hwmon_name}:{pcie}:IN_P_PKT_CNT {hwmon_name}:{pcie}:OUT_C_BYTE_CNT {hwmon_name}:{pcie}:OUT_C_PKT_CNT {hwmon_name}:{pcie}:OUT_NP_BYTE_CNT {hwmon_name}:{pcie}:OUT_NP_PKT_CNT {hwmon_name}:{pcie}:OUT_P_PKT_CNT {hwmon_name}:{tile}:MEMORY_READS {hwmon_name}:{tile}:MEMORY_WRITES {hwmon_name}:{tile}:MSS_NO_CREDIT {hwmon_name}:{tile}:VICTIM_WRITE {hwmon_name}:{tilenet}:CDN_DIAG_C_OUT_OF_CRED {hwmon_name}:{tilenet}:CDN_REQ {hwmon_name}:{tilenet}:DDN_REQ {hwmon_name}:{tilenet}:NDN_REQ {hwmon_name}:{trio}:TDMA_DATA_BEAT {hwmon_name}:{trio}:TDMA_PBUF_MAC_AF {hwmon_name}:{trio}:TDMA_RT_AF {hwmon_name}:{trio}:TPIO_DATA_BEAT {hwmon_name}:{triogen}:TX_DAT_AF {hwmon_name}:{triogen}:TX_DAT_AF

  • BlueField-3 hwmon counters:

    Copy
    Copied!
                

    {hwmon_name}:{llt}:GDC_BANK0_RD_REQ {hwmon_name}:{llt}:GDC_BANK1_RD_REQ {hwmon_name}:{llt}:GDC_BANK0_WR_REQ {hwmon_name}:{llt}:GDC_BANK1_WR_REQ {hwmon_name}:{llt_miss}:GDC_MISS_MACHINE_RD_REQ {hwmon_name}:{llt_miss}:GDC_MISS_MACHINE_WR_REQ {hwmon_name}:{mss}:SKYLIB_DDN_TX_FLITS {hwmon_name}:{mss}:SKYLIB_DDN_RX_FLITS

  • BlueField-3 bf_ptm counters:

    Copy
    Copied!
                

    bf:ptm:active_power_profile bf:ptm:atx_power_available bf:ptm:core_temp bf:ptm:ddr_temp bf:ptm:error_state bf:ptm:power_envelope bf:ptm:power_throttling_event_count bf:ptm:power_throttling_state bf:ptm:thermal_throttling_event_count bf:ptm:thermal_throttling_state bf:ptm:throttling_state bf:ptm:total_power bf:ptm:vr0_power bf:ptm:vr1_power

  • rate counters – calculated counters showing the rate of raw counters of other components. Such counters are identified by a _rate suffix which correspond to the original raw counter name they track.

Port Counters

The following parameters are located in /sys/class/infiniband/mlx5_0/ports/1/counters.

Counter

Description

InfiniBand Spec Name

Group

port_rcv_data

The total number of data octets, divided by 4, (counting in double words, 32 bits), received on all VLs from the port.

PortRcvData

Informative

port_rcv_packets

Total number of packets (this may include packets containing Errors. This is 64 bit counter.

PortRcvPkts

Informative

port_multicast_rcv_packets

Total number of multicast packets, including multicast packets containing errors.

PortMultiCastRcvPkts

Informative

port_unicast_rcv_packets

Total number of unicast packets, including unicast packets containing errors.

PortUnicastRcvPkts

Informative

port_xmit_data

The total number of data octets, divided by 4, (counting in double words, 32 bits), transmitted on all VLs from the port.

PortXmitData

Informative

port_xmit_packets

port_xmit_packets_64

Total number of packets transmitted on all VLs from this port. This may include packets with errors.

This is 64 bit counter.

PortXmitPkts

Informative

port_rcv_switch_relay_errors

Total number of packets received on the port that were discarded because they could not be forwarded by the switch relay.

PortRcvSwitchRelayErrors

Error

port_rcv_errors

Total number of packets containing an error that were received on the port.

PortRcvErrors

Informative

port_rcv_constraint_errors

Total number of packets received on the switch physical port that are discarded.

PortRcvConstraintErrors

Error

local_link_integrity_errors

The number of times that the count of local physical errors exceeded the threshold specified by LocalPhyErrors.

LocalLinkIntegrityErrors

Error

port_xmit_wait

The number of ticks during which the port had data to transmit but no data was sent during the entire tick (either because of insufficient credits or because of lack of arbitration).

PortXmitWait

Informative

port_multicast_xmit_packets

Total number of multicast packets transmitted on all VLs from the port. This may include multicast packets with errors.

PortMultiCastXmitPkts

Informative

port_unicast_xmit_packets

Total number of unicast packets transmitted on all VLs from the port. This may include unicast packets with errors.

PortUnicastXmitPkts

Informative

port_xmit_discards

Total number of outbound packets discarded by the port because the port is down or congested.

PortXmitDiscards

Error

port_xmit_constraint_errors

Total number of packets not transmitted from the switch physical port.

PortXmitConstraintErrors

Error

port_rcv_remote_physical_errors

Total number of packets marked with the EBP delimiter received on the port.

PortRcvRemotePhysicalErrors

Error

symbol_error

Total number of minor link errors detected on one or more physical lanes.

SymbolErrorCounter

Error

VL15_dropped

Number of incoming VL15 packets dropped due to resource limitations (e.g., lack of buffers) of the port.

VL15Dropped

Error

link_error_recovery

Total number of times the Port Training state machine has successfully completed the link error recovery process.

LinkErrorRecoveryCounter

Error

link_downed

Total number of times the Port Training state machine has failed the link error recovery process and downed the link.

LinkDownedCounter

Error


Hardware Counters

The hardware counters, found under /sys/class/infiniband/mlx5_0/ports/1/hw_counters/, are counted per function and exposed on the function. Some counters are not counted per function. These counters are commented with a relevant comment.

Counter

Description

Group

duplicate_request

Number of received packets. A duplicate request is a request that had been previously executed.

Error

implied_nak_seq_err

Number of times the requested decided an ACK. with a PSN larger than the expected PSN for an RDMA read or response.

Error

lifespan

The maximum period in ms which defines the aging of the counter reads. Two consecutive reads within this period might return the same values

Informative

local_ack_timeout_err

The number of times QP's ack timer expired for RC, XRC, DCT QPs at the sender side.

The QP retry limit was not exceeded, therefore it is still recoverable error.

Error

np_cnp_sent

The number of CNP packets sent by the Notification Point when it noticed congestion experienced in the RoCEv2 IP header (ECN bits).

Informative

np_ecn_marked_roce_packets

The number of RoCEv2 packets received by the notification point which were marked for experiencing the congestion (ECN bits where '11' on the ingress RoCE traffic) .

Informative

out_of_buffer

The number of drops occurred due to lack of WQE for the associated QPs.

Error

out_of_sequence

The number of out of sequence packets received.

Error

packet_seq_err

The number of received NAK sequence error packets. The QP retry limit was not exceeded.

Error

req_cqe_error

The number of times requester detected CQEs completed with errors.

Error

req_cqe_flush_error

The number of times requester detected CQEs completed with flushed errors.

Error

req_remote_access_errors

The number of times requester detected remote access errors.

Error

req_remote_invalid_request

The number of times requester detected remote invalid request errors.

Error

resp_cqe_error

The number of times responder detected CQEs completed with errors.

Error

resp_cqe_flush_error

The number of times responder detected CQEs completed with flushed errors.

Error

resp_local_length_error

The number of times responder detected local length errors.

Error

resp_remote_access_errors

The number of times responder detected remote access errors.

Error

rnr_nak_retry_err

The number of received RNR NAK packets. The QP retry limit was not exceeded.

Error

rp_cnp_handled

The number of CNP packets handled by the Reaction Point HCA to throttle the transmission rate.

Informative

rp_cnp_ignored

The number of CNP packets received and ignored by the Reaction Point HCA. This counter should not raise if RoCE Congestion Control was enabled in the network. If this counter raise, verify that ECN was enabled on the adapter. See HowTo Configure DCQCN (RoCE CC) values for ConnectX-4 (Linux).

Error

rx_atomic_requests

The number of received ATOMIC request for the associated QPs.

Informative

rx_dct_connect

The number of received connection request for the associated DCTs.

Informative

rx_read_requests

The number of received READ requests for the associated QPs.

Informative

rx_write_requests

The number of received WRITE requests for the associated QPs.

Informative

rx_icrc_encapsulated

The number of RoCE packets with ICRC errors.

Error

roce_adp_retrans

Counts the number of adaptive retransmissions for RoCE traffic

Informative

roce_adp_retrans_to

Counts the number of times RoCE traffic reached timeout due to adaptive retransmission

Informative

roce_slow_restart

Counts the number of times RoCE slow restart was used

Informative

roce_slow_restart_cnps

Counts the number of times RoCE slow restart generated CNP packets

Informative

roce_slow_restart_trans

Counts the number of times RoCE slow restart changed state to slow restart

Informative

roce_slow_restart

Counts the number of times RoCE traffic reached timeout due to adaptive retransmission

Informative


Debug Status Counters

The following parameters are located in /sys/class/net/<interface>/debug.

Parameter

Description

Default

lro_timeout

Sets the LRO timer period value in usecs which will be used as LRO session expiration time. For example:

Copy
Copied!
            

# cat /sys/class/net/eth2/debug/lro_timeout Actual timeout: 32 Supported timeout: 8 16 32 1024

32

link_down_reason

Link down reason will allow the user to query the reason which is preventing the link from going up. For example:

Copy
Copied!
            

$ cat /sys/class/net/ethXX/debug/link_down_reason monitor_opcode: 0x0 status_message: The port is Active.

Refer to the adapter PRM for all possible options (PDDR register).

N/A

Power Thermal Counters

The bf_ptm component collects BlueField-3 power thermal counters using remote collection. It is disabled by default and can be enabled as follows:

  1. Load kernel module mlxbf-ptm:

    Copy
    Copied!
                

    modprobe -v mlxbf-ptm

  2. Enable component using remote collection:

    Copy
    Copied!
                

    enable-provider=grpc.sysfs.bf_ptm

    Note

    DPE server should be active before changing the dts_config.ini file. See section "Remote Collection" for details.

Ethtool Counters

Ethtool counters is the generated list of counters which corresponds to Ethtool utility. Counters are generated on a per-device basis.

There are several counter groups, depending on where the counter is counted:

  • Ring – software ring counters

  • Software port – an aggregation of software ring counters

  • vPort counters – traffic counters and drops due to steering or no buffers. May indicate BlueField issues. These counters include Ethernet traffic counters (including raw Ethernet) and RDMA/RoCE traffic counters.

  • Physical port counters – the physical port connecting BlueField to the network. May indicate device issues or link or network issues. This measuring point holds information on standardized counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and additional counters like flow control, FEC, and more. Physical port counters are not exposed to virtual machines.

  • Priority port counters – a set of the physical port counters, per priory per port

Each group of counters may have different counter types:

  • Traffic informative counters – counters which counts traffic. These counters can be used for load estimation of for general debug.

  • Traffic acceleration counters – counters which counts traffic accelerated by NVIDIA drivers or by hardware. The counters are an additional layer to the informative counter set and the same traffic is counted in both informative and acceleration counters. Acceleration counters are marked with [A].

  • Error counters – increment of these counters might indicate a problem

The following acceleration mechanisms have dedicated counters:

  • TCP segmentation offload (TSO) – increasing outbound throughput and reducing CPU utilization by allowing the kernel to buffer multiple packets in a single large buffer. The BlueField splits the buffer into packet and transmits it.

  • Large receive offload (LRO) – increasing inbound throughput and reducing CPU utilization by aggregation of multiple incoming packets of a single stream to a single buffer

  • CHECKSUM – calculation of TCP checksum (by the BlueField). The following checksum offloads are available (refer to skbuff.h for detailed explanation)

    • CHECKSUM_UNNECESSARY

    • CHECKSUM_NONE – no checksum acceleration was used

    • CHECKSUM_COMPLETE – device provided checksum on the entire packet

    • CHECKSUM_PARTIAL – device provided checksum

  • CQE compress – compression of completion queue events (CQE) used for sparing bandwidth on PCIe and hence achieve better performance.

Ring/Software Port Counters

The following counters are available per ring or software port.

These counters provide information on the amount of traffic accelerated by the BlueField. The counters tally the accelerated traffic in addition to the standard counters which tally that (i.e. accelerated traffic is counted twice).

The counter names in the table below refers to both ring and port counters. the notation for ring counters includes the [i] index without the braces. the notation for port counters does not include the [i]. a counter name rx[i]_packets will be printed as rx0_packets for ring 0 and rx_packets for the software port

Counter

Description

Type

rx[i]_packets

The number of packets received on ring i.

Informative

rx[i]_bytes

The number of bytes received on ring i.

Informative

tx[i]_packets

The number of packets transmitted on ring i.

Informative

tx[i]_bytes

The number of bytes transmitted on ring i.

Informative

tx[i]_tso_packets

The number of TSO packets transmitted on ring i [A].

Acceleration

tx[i]_tso_bytes

The number of TSO bytes transmitted on ring i [A].

Acceleration

tx[i]_tso_inner_packets

The number of TSO packets which are indicated to be carry internal encapsulation transmitted on ring i [A]

Acceleration

tx[i]_tso_inner_bytes

The number of TSO bytes which are indicated to be carry internal encapsulation transmitted on ring i [A].

Acceleration

rx[i]_lro_packets

The number of LRO packets received on ring i [A].

Acceleration

rx[i]_lro_bytes

The number of LRO bytes received on ring i [A].

Acceleration

rx[i]_csum_unnecessary

Packets received with a CHECKSUM_UNNECESSARY on ring i [A].

Acceleration

rx[i]_csum_none

Packets received with CHECKSUM_NONE on ring i [A].

Acceleration

rx[i]_csum_complete

Packets received with a CHECKSUM_COMPLETE on ring i [A].

Acceleration

rx[i]_csum_unnecessary_inner

Packets received with inner encapsulation with a CHECK_SUM UNNECESSARY on ring i [A].

Acceleration

tx[i]_csum_partial

Packets transmitted with a CHECKSUM_PARTIAL on ring i [A].

Acceleration

tx[i]_csum_partial_inner

Packets transmitted with inner encapsulation with a CHECKSUM_PARTIAL on ring i [A].

Acceleration

tx[i]_csum_none

Packets transmitted with no hardware checksum acceleration on ring i.

Informative

tx[i]_stopped

tx_queue_stopped 1

Events where SQ was full on ring i. If this counter is increased, check the amount of buffers allocated for transmission.

Error

tx[i]_wake

tx_queue_wake 1

Events where SQ was full and has become not full on ring i.

Error

tx[i]_dropped

tx_queue_dropped 1

Packets transmitted that were dropped due to DMA mapping failure on ring i. If this counter is increased, check the amount of buffers allocated for transmission.

Error

rx[i]_wqe_err

The number of wrong opcodes received on ring i.

Error

tx[i]_nop

The number of no WQEs (empty WQEs) inserted to the SQ (related to ring i) due to the reach of the end of the cyclic buffer. When reaching near to the end of cyclic buffer the driver may add those empty WQEs to avoid handling a state the a WQE start in the end of the queue and ends in the beginning of the queue. This is a normal condition.

Informative

rx[i]_mpwqe_frag

The number of WQEs that failed to allocate compound page and hence fragmented MPWQE's (multipacket WQEs) were used on ring i. If this counter raise, it may suggest that there is no enough memory for large pages, the driver allocated fragmented pages. This is not abnormal condition.

Informative

rx[i]_mpwqe_filler_cqes

The number of filler CQEs events that where issued on ring i.

Info

The counter name before kernel 4.19 was rx[i]_mpwqe_filler.

Informative

rx[i]_cqe_compress_blks

The number of receive blocks with CQE compression on ring i [A].

Acceleration

rx[i]_cqe_compress_pkts

The number of receive packets with CQE compression on ring i [A].

Acceleration

rx[i]_cache_reuse

The number of events of successful reuse of a page from a driver's internal page cache

Acceleration

rx[i]_cache_full

The number of events of full internal page cache where driver can't put a page back to the cache for recycling (page will be freed)

Acceleration

rx[i]_cache_empty

The number of events where cache was empty - no page to give. driver shall allocate new page

Acceleration

rx[i]_cache_busy

The number of events where cache head was busy and cannot be recycled. driver allocated new page

Acceleration

rx[i]_xmit_more

The number of packets sent with xmit_more indication set on the skbuff (no doorbell)

Acceleration

tx[i]_cqes

The number of completions received on the CQ of TX ring.

Informative

ch[i]_poll

The number of invocations of NAPI poll of channel.

Informative

ch[i]_arm

The number of times the NAPI poll function completed and armed the completion queues on channel

Info

Supported from kernel 4.19.

Informative

ch[i]_aff_change

The number of times the NAPI poll function explicitly stopped execution on a CPU due to a change in affinity, on channel.

Informative

rx[i]_congst_umr

The number of times an outstanding UMR request is delayed due to congestion, on ring.

Info

Supported from kernel 4.19.

Error

ch[i]_events

The number of hard interrupt events on the completion queues of channel.

Informative

rx[i]_mpwqe_filler_strides

The number of strides consumed by filler CQEs on ring.

Informative

rx[i]_xdp_tx_xmit

The number of packets forwarded back to the port due to XDP program XDP_TX action (bouncing). these packets are not counted by other software counters. These packets are counted by physical port and vPort counters.

Informative

rx[i]_xdp_tx_full

The number of packets that should have been forwarded back to the port due to XDP_TX action but were dropped due to full tx queue. these packets are not counted by other software counters. These packets are counted by physical port and vPort counters

You may open more rx queues and spread traffic rx over all queues and/or increase rx ring size.

Error

rx[i]_xdp_tx_err

The number of times an XDP_TX error such as frame too long and frame too short occurred on XDP_TX ring of RX ring.

Error

rx[i]_xdp_tx_cqes

rx_xdp_tx_cqe 1

The number of completions received on the CQ of the XDP-TX ring.

Informative

rx[i]_xdp_drop

The number of packets dropped due to XDP program XDP_DROP action. these packets are not counted by other software counters. These packets are counted by physical port and vPort counters.

Informative

rx[i]_xdp_redirect

The number of times an XDP redirect action has been triggered on ring.

Acceleration

tx[i]_xdp_xmit

The number of packets redirected to the interface (due to XDP redirect). These packets are not counted by other software counters. These packets are counted by physical port and vPort counters.

Informative

tx[i]_xdp_full

The number of packets redirected to the interface (due to XDP redirect) but were dropped due to the Tx queue being full. These packets are not counted by other software counters. Users may enlarge Tx queues.

Informative

tx[i]_xdp_err

The number of packets redirected to the interface (due to XDP redirect) but were dropped due to an error (e.g., frame too long and frame too short).

Error

tx[i]_xdp_cqes

The number of completions received for packets redirected to the interface (due to XDP redirect) on the CQ.

Informative

rx[i]_cache_waive

The number of cache evacuation. This can occur due to page move to another NUMA node or page was pfmemalloc-ed and should be freed as soon as possible.

Acceleration

  1. The corresponding ring and global counters do not share the same name (i.e., do not follow the common naming scheme).      

vPort Counters

Counters on the eswitch port that is connected to the vNIC.

Counter

Description

Type

rx_vport_unicast_packets

Unicast packets received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_unicast_bytes

Unicast bytes received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_unicast_packets

Unicast packets transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_unicast_bytes

Unicast bytes transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_multicast_packets

Multicast packets received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_multicast_bytes

Multicast bytes received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_multicast_packets

Multicast packets transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_multicast_bytes

Multicast bytes transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_broadcast_packets

Broadcast packets received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_broadcast_bytes

Broadcast bytes received, steered to a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_broadcast_packets

Broadcast packets transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

tx_vport_broadcast_bytes

Broadcast packets transmitted, steered from a port including raw Ethernet QP/DPDK traffic, excluding RDMA traffic

Informative

rx_vport_rdma_unicast_packets

RDMA unicast packets received, steered to a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

rx_vport_rdma_unicast_bytes

RDMA unicast bytes received, steered to a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

tx_vport_rdma_unicast_packets

RDMA unicast packets transmitted, steered from a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

tx_vport_rdma_unicast_bytes

RDMA unicast bytes transmitted, steered from a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

rx_vport_ rdma _multicast_packets

RDMA multicast packets received, steered to a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

rx_vport_ rdma _multicast_bytes

RDMA multicast bytes received, steered to a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

tx_vport_ rdma _multicast_packets

RDMA multicast packets transmitted, steered from a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

tx_vport_ rdma _multicast_bytes

RDMA multicast bytes transmitted, steered from a port (counters counts RoCE/UD/RC traffic) [A]

Acceleration

rx_steer_missed_packets

Number of packets received by the NIC but discarded due to not matching any flow in the NIC flow table.

Info

Supported from kernel 4.16.

Error

rx_packets

Representor only: packets received, that were handled by the hypervisor.

Info

Supported from kernel 4.18.

Informative

rx_bytes

Representor only: bytes received, that were handled by the hypervisor.

Info

Supported from kernel 4.18.

Informative

tx_packets

Representor only: packets transmitted which have been handled by the hypervisor.

Info

Supported from kernel 4.18.

Informative

tx_bytes

Representor only: bytes transmitted which have been handled by the hypervisor.

Info

Supported from kernel 4.18.

Informative


Physical Port Counters

The physical port counters are the counters on the external port connecting adapter to the network. This measuring point holds information on standardized counters like IEEE 802.3, RFC2863, RFC 2819, RFC 3635 and additional counters like flow control, FEC and more.

Counter

Description

Type

rx_packets_phy

The number of packets received on the physical port. This counter doesn’t include packets that were discarded due to FCS, frame size and similar errors.

Informative

tx_packets_phy

The number of packets transmitted on the physical port.

Informative

rx_bytes_phy

The number of bytes received on the physical port, including Ethernet header and FCS.

Informative

tx_bytes_phy

The number of bytes transmitted on the physical port.

Informative

rx_multicast_phy

The number of multicast packets received on the physical port.

Informative

tx_multicast_phy

The number of multicast packets transmitted on the physical port.

Informative

rx_broadcast_phy

The number of broadcast packets received on the physical port.

Informative

tx_broadcast_phy

The number of broadcast packets transmitted on the physical port.

Informative

rx_crc_errors_phy

The number of dropped received packets due to frame check sequence (FCS) error on the physical port. If this counter is increased in high rate, check the link quality using rx_symbol_error_phy and rx_corrected_bits_phy counters below.

Error

rx_in_range_len_errors_phy

The number of received packets dropped due to length/type errors on a physical port.

Error

rx_out_of_range_len_phy

The number of received packets dropped due to length greater than allowed on a physical port.

If this counter is increasing, it implies that the peer connected to the adapter has a larger MTU configured. Using same MTU configuration shall resolve this issue.

Error

rx_oversize_pkts_phy

The number of dropped received packets due to length which exceed MTU size on a physical port. If this counter is increasing, it implies that the peer connected to the adapter has a larger MTU configured. Using same MTU configuration shall resolve this issue.

Error

rx_symbol_err_phy

The number of received packets dropped due to physical coding errors (symbol errors) on a physical port.

Error

rx_mac_control_phy

The number of MAC control packets received on the physical port.

Informative

tx_mac_control_phy

The number of MAC control packets transmitted on the physical port.

Informative

rx_pause_ctrl_phy

The number of link layer pause packets received on a physical port. If this counter is increasing, it implies that the network is congested and cannot absorb the traffic coming from to the adapter.

Informative

tx_pause_ctrl_phy

The number of link layer pause packets transmitted on a physical port. If this counter is increasing, it implies that the NIC is congested and cannot absorb the traffic coming from the network.

Informative

rx_unsupported_op_phy

The number of MAC control packets received with unsupported opcode on a physical port.

Error

rx_discards_phy

The number of received packets dropped due to lack of buffers on a physical port. If this counter is increasing, it implies that the adapter is congested and cannot absorb the traffic coming from the network.

Error

tx_discards_phy

The number of packets which were discarded on transmission, even no errors were detected. the drop might occur due to link in down state, head of line drop, pause from the network, etc.

Error

tx_errors_phy

The number of transmitted packets dropped due to a length which exceed MTU size on a physical port.

Error

rx_undersize_pkts_phy

The number of received packets dropped due to length which is shorter than 64 bytes on a physical port. If this counter is increasing, it implies that the peer connected to the adapter has a non-standard MTU configured or malformed packet had arrived.

Error

rx_fragments_phy

The number of received packets dropped due to a length which is shorter than 64 bytes and has FCS error on a physical port. If this counter is increasing, it implies that the peer connected to the adapter has a non-standard MTU configured.

Error

rx_jabbers_phy

The number of received packets d due to a length which is longer than 64 bytes and had FCS error on a physical port.

Error

rx_64_bytes_phy

The number of packets received on the physical port with size of 64 bytes.

Informative

rx_65_to_127_bytes_phy

The number of packets received on the physical port with size of 65 to 127 bytes.

Informative

rx_128_to_255_bytes_phy

The number of packets received on the physical port with size of 128 to 255 bytes.

Informative

rx_256_to_511_bytes_phy

The number of packets received on the physical port with size of 256 to 512 bytes.

Informative

rx_512_to_1023_bytes_phy

The number of packets received on the physical port with size of 512 to 1023 bytes.

Informative

rx_1024_to_1518_bytes_phy

The number of packets received on the physical port with size of 1024 to 1518 bytes.

Informative

rx_1519_to_2047_bytes_phy

The number of packets received on the physical port with size of 1519 to 2047 bytes.

Informative

rx_2048_to_4095_bytes_phy

The number of packets received on the physical port with size of 2048 to 4095 bytes.

Informative

rx_4096_to_8191_bytes_phy

The number of packets received on the physical port with size of 4096 to 8191 bytes.

Informative

rx_8192_to_10239_bytes_phy

The number of packets received on the physical port with size of 8192 to 10239 bytes.

Informative

link_down_events_phy

The number of times where the link operative state changed to down. In case this counter is increasing it may imply on port flapping. You may need to replace the cable/transceiver.

Error

rx_out_of_buffer

Number of times receive queue had no software buffers allocated for the adapter's incoming traffic.

Error

module_bus_stuck

The number of times that module's I2C bus (data or clock) short-wire was detected. You may need to replace the cable/transceiver.

Info

Supported from kernel 4.10.

Error

module_high_temp

The number of times that the module temperature was too high. If this issue persists, you may need to check the ambient temperature or replace the cable/transceiver module.

Info

Supported from kernel 4.10.

Error

module_bad_shorted

The number of times that the module cables were shorted. You may need to replace the cable/transceiver module.

Info

Supported from kernel 4.10.

Error

module_unplug

The number of times that module was ejected.

Info

Supported from kernel 4.10.

Informative

rx_buffer_passed_thres_phy

The number of events where the port receive buffer was over 85% full.

Info

Supported from kernel 4.14.

Informative

tx_pause_storm_warning_events

The number of times the device was sending pauses for a long period of time.

Info

Supported from kernel 4.15.

Informative

tx_pause_storm_error_events

The number of times the device was sending pauses for a long period of time, reaching time out and disabling transmission of pause frames. on the period where pause frames were disabled, drop could have been occurred.

Info

Supported from kernel 4.15.

Error

rx[i]_buff_alloc_err / rx_buff_alloc_err

Failed to allocate a buffer to received packet (or SKB) on port (or per ring)

Error

rx_bits_phy

This counter provides information on the total amount of traffic that could have been received and can be used as a guideline to measure the ratio of errored traffic in rx_pcs_symbol_err_phy and rx_corrected_bits_phy.

Informative

rx_pcs_symbol_err_phy

This counter counts the number of symbol errors that wasn’t corrected by FEC correction algorithm or that FEC algorithm was not active on this interface. If this counter is increasing, it implies that the link between the NIC and the network is suffering from high BER, and that traffic is lost. You may need to replace the cable/transceiver. The error rate is the number of rx_pcs_symbol_err_phy divided by the number of rx_phy_bits on a specific time frame.

Error

rx_corrected_bits_phy

The number of corrected bits on this port according to active FEC (RS/FC). If this counter is increasing, it implies that the link between the NIC and the network is suffering from high BER. The corrected bit rate is the number of rx_corrected_bits_phy divided by the number of rx_phy_bits on a specific time frame

Error

phy_raw_errors_lane[l]

This counter counts the number of physical raw errors per lane [l] index. The counter counts errors before FEC corrections. If this counter is increasing, it implies that the link between the NIC and the network is suffering from high BER, and that traffic might be lost. You may need to replace the cable/transceiver. Please check in accordance with rx_corrected_bits_phy .

Info

Supported from kernel 4.20.

Error


Priority Port Counters

The following counters are physical port counters that being counted per L2 priority (0-7).

Info

p in the counter name represents the priority.

Counter

Description

Type

rx_prio[p]_bytes

The number of bytes received with priority p on the physical port.

Informative

rx_prio[p]_packets

The number of packets received with priority p on the physical port.

Informative

tx_prio[p]_bytes

The number of bytes transmitted on priority p on the physical port.

Informative

tx_prio[p]_packets

The number of packets transmitted on priority p on the physical port.

Informative

rx_prio[p]_pause

The number of pause packets received with priority p on a physical port. If this counter is increasing, it implies that the network is congested and cannot absorb the traffic coming from the adapter.

Note: This counter is available only if PFC was enabled on priority p. Refer to HowTo Configure PFC on ConnectX-4.

Informative

rx_prio[p]_pause_duration

The duration of pause received (in microSec) on priority p on the physical port. The counter represents the time the port did not send any traffic on this priority. If this counter is increasing, it implies that the network is congested and cannot absorb the traffic coming from the adapter.

Note: This counter is available only if PFC was enabled on priority p. Refer to HowTo Configure PFC on ConnectX-4.

Informative

rx_prio[p]_pause_transition

The number of times a transition from Xoff to Xon on priority p on the physical port has occurred.

Note: This counter is available only if PFC was enabled on priority p. Refer to HowTo Configure PFC on ConnectX-4.

Informative

tx_prio[p]_pause

The number of pause packets transmitted on priority p on a physical port. If this counter is increasing, it implies that the adapter is congested and cannot absorb the traffic coming from the network.

Note: This counter is available only if PFC was enabled on priority p. Refer to HowTo Configure PFC on ConnectX-4.

Informative

tx_prio[p]_pause_duration

The duration of pause transmitter (in microSec) on priority p on the physical port.

Note: This counter is available only if PFC was enabled on priority p. Refer to HowTo Configure PFC on ConnectX-4.

Informative

rx_prio[p]_buf_discard

The number of packets discarded by device due to lack of per host receive buffers.

Info

Supported from kernel 5.3.

Informative

rx_prio[p]_cong_discard

The number of packets discarded by device due to per host congestion.

Info

Supported from kernel 5.3.

Informative

rx_prio[p]_marked

The number of packets ecn marked by device due to per host congestion.

Info

Supported from kernel 5.3.

Informative

rx_prio[p]_discard

The number of packets discarded by device due to lack of receive buffers.

Info

Supported from kernel 5.6.

Infornative


Device Counters

Counter

Description

Type

rx_pci_signal_integrity

Counts physical layer PCIe signal integrity errors, the number of transitions to recovery due to Framing errors and CRC (dlp and tlp).

If this counter is raising, try moving the adapter card to a different slot to rule out a bad PCIe slot. Validate that you are running with the latest firmware available and latest server BIOS version.

Error

tx_pci_signal_integrity

Counts physical layer PCIe signal integrity errors, the number of transition to recovery initiated by the other side (moving to recovery due to getting TS/EIEOS).

If this counter is raising, try moving the adapter card to a different slot to rule out a bad PCI slot. Validate that you are running with the latest firmware available and latest server BIOS version.

Error

outbound_pci_buffer_overflow

The number of packets dropped due to pci buffer overflow. If this counter is raising in high rate, it might indicate that the receive traffic rate for a host is larger than the PCIe bus and therefore a congestion occurs.

Info

Supported from kernel 4.14.

Informative

outbound_pci_stalled_rd

The percentage (in the range 0...100) of time within the last second that the NIC had outbound non-posted reads requests but could not perform the operation due to insufficient posted credits.

Info

Supported from kernel 4.14.

Informative

outbound_pci_stalled_wr

The percentage (in the range 0...100) of time within the last second that the NIC had outbound posted writes requests but could not perform the operation due to insufficient posted credits.

Info

Supported from kernel 4.14.

Informative

outbound_pci_stalled_rd_events

The number of seconds where outbound_pci_stalled_rd was above 30%.

Info

Supported from kernel 4.14.

Informative

outbound_pci_stalled_wr_events

The number of seconds where outbound_pci_stalled_wr was above 30%.

Info

Supported from kernel 4.14.

Informative

dev_out_of_buffer

The number of times the device owned queue had not enough buffers allocated.

Error


Full List of Counters

Copy
Copied!
            

# ethtool -S eth5   NIC statistics: rx_packets: 10 rx_bytes: 3420 tx_packets: 18 tx_bytes: 1296 tx_tso_packets: 0 tx_tso_bytes: 0 tx_tso_inner_packets: 0 tx_tso_inner_bytes: 0 tx_added_vlan_packets: 0 tx_nop: 0 rx_lro_packets: 0 rx_lro_bytes: 0 rx_ecn_mark: 0 rx_removed_vlan_packets: 0 rx_csum_unnecessary: 0 rx_csum_none: 0 rx_csum_complete: 10 rx_csum_unnecessary_inner: 0 rx_xdp_drop: 0 rx_xdp_redirect: 0 rx_xdp_tx_xmit: 0 rx_xdp_tx_full: 0 rx_xdp_tx_err: 0 rx_xdp_tx_cqe: 0 tx_csum_none: 18 tx_csum_partial: 0 tx_csum_partial_inner: 0 tx_queue_stopped: 0 tx_queue_dropped: 0 tx_xmit_more: 0 tx_recover: 0 tx_cqes: 18 tx_queue_wake: 0 tx_udp_seg_rem: 0 tx_cqe_err: 0 tx_xdp_xmit: 0 tx_xdp_full: 0 tx_xdp_err: 0 tx_xdp_cqes: 0 rx_wqe_err: 0 rx_mpwqe_filler_cqes: 0 rx_mpwqe_filler_strides: 0 rx_buff_alloc_err: 0 rx_cqe_compress_blks: 0 rx_cqe_compress_pkts: 0 rx_page_reuse: 0 rx_cache_reuse: 0 rx_cache_full: 0 rx_cache_empty: 2688 rx_cache_busy: 0 rx_cache_waive: 0 rx_congst_umr: 0 rx_arfs_err: 0 ch_events: 75 ch_poll: 75 ch_arm: 75 ch_aff_change: 0 ch_eq_rearm: 0 rx_out_of_buffer: 0 rx_if_down_packets: 15 rx_steer_missed_packets: 0 rx_vport_unicast_packets: 0 rx_vport_unicast_bytes: 0 tx_vport_unicast_packets: 0 tx_vport_unicast_bytes: 0 rx_vport_multicast_packets: 2 rx_vport_multicast_bytes: 172 tx_vport_multicast_packets: 12 tx_vport_multicast_bytes: 936 rx_vport_broadcast_packets: 37 rx_vport_broadcast_bytes: 9270 tx_vport_broadcast_packets: 6 tx_vport_broadcast_bytes: 360 rx_vport_rdma_unicast_packets: 0 rx_vport_rdma_unicast_bytes: 0 tx_vport_rdma_unicast_packets: 0 tx_vport_rdma_unicast_bytes: 0 rx_vport_rdma_multicast_packets: 0 rx_vport_rdma_multicast_bytes: 0 tx_vport_rdma_multicast_packets: 0 tx_vport_rdma_multicast_bytes: 0 tx_packets_phy: 0 rx_packets_phy: 0 rx_crc_errors_phy: 0 tx_bytes_phy: 0 rx_bytes_phy: 0 tx_multicast_phy: 0 tx_broadcast_phy: 0 rx_multicast_phy: 0 rx_broadcast_phy: 0 rx_in_range_len_errors_phy: 0 rx_out_of_range_len_phy: 0 rx_oversize_pkts_phy: 0 rx_symbol_err_phy: 0 tx_mac_control_phy: 0 rx_mac_control_phy: 0 rx_unsupported_op_phy: 0 rx_pause_ctrl_phy: 0 tx_pause_ctrl_phy: 0 rx_discards_phy: 0 tx_discards_phy: 0 tx_errors_phy: 0 rx_undersize_pkts_phy: 0 rx_fragments_phy: 0 rx_jabbers_phy: 0 rx_64_bytes_phy: 0 rx_65_to_127_bytes_phy: 0 rx_128_to_255_bytes_phy: 0 rx_256_to_511_bytes_phy: 0 rx_512_to_1023_bytes_phy: 0 rx_1024_to_1518_bytes_phy: 0 rx_1519_to_2047_bytes_phy: 0 rx_2048_to_4095_bytes_phy: 0 rx_4096_to_8191_bytes_phy: 0 rx_8192_to_10239_bytes_phy: 0 link_down_events_phy: 0 rx_prio0_bytes: 0 rx_prio0_packets: 0 tx_prio0_bytes: 0 tx_prio0_packets: 0 rx_prio1_bytes: 0 rx_prio1_packets: 0 tx_prio1_bytes: 0 tx_prio1_packets: 0 rx_prio2_bytes: 0 rx_prio2_packets: 0 tx_prio2_bytes: 0 tx_prio2_packets: 0 rx_prio3_bytes: 0 rx_prio3_packets: 0 tx_prio3_bytes: 0 tx_prio3_packets: 0 rx_prio4_bytes: 0 rx_prio4_packets: 0 tx_prio4_bytes: 0 tx_prio4_packets: 0 rx_prio5_bytes: 0 rx_prio5_packets: 0 tx_prio5_bytes: 0 tx_prio5_packets: 0 rx_prio6_bytes: 0 rx_prio6_packets: 0 tx_prio6_bytes: 0 tx_prio6_packets: 0 rx_prio7_bytes: 0 rx_prio7_packets: 0 tx_prio7_bytes: 0 tx_prio7_packets: 0 module_unplug: 0 module_bus_stuck: 0 module_high_temp: 0 module_bad_shorted: 0 ch0_events: 9 ch0_poll: 9 ch0_arm: 9 ch0_aff_change: 0 ch0_eq_rearm: 0 ch1_events: 23 ch1_poll: 23 ch1_arm: 23 ch1_aff_change: 0 ch1_eq_rearm: 0 ch2_events: 8 ch2_poll: 8 ch2_arm: 8 ch2_aff_change: 0 ch2_eq_rearm: 0 ch3_events: 19 ch3_poll: 19 ch3_arm: 19 ch3_aff_change: 0 ch3_eq_rearm: 0 ch4_events: 8 ch4_poll: 8 ch4_arm: 8 ch4_aff_change: 0 ch4_eq_rearm: 0 ch5_events: 8 ch5_poll: 8 ch5_arm: 8 ch5_aff_change: 0 ch5_eq_rearm: 0 rx0_packets: 0 rx0_bytes: 0 rx0_csum_complete: 0 rx0_csum_unnecessary: 0 rx0_csum_unnecessary_inner: 0 rx0_csum_none: 0 rx0_xdp_drop: 0 rx0_xdp_redirect: 0 rx0_lro_packets: 0 rx0_lro_bytes: 0 rx0_ecn_mark: 0 rx0_removed_vlan_packets: 0 rx0_wqe_err: 0 rx0_mpwqe_filler_cqes: 0 rx0_mpwqe_filler_strides: 0 rx0_buff_alloc_err: 0 rx0_cqe_compress_blks: 0 rx0_cqe_compress_pkts: 0 rx0_page_reuse: 0 rx0_cache_reuse: 0 rx0_cache_full: 0 rx0_cache_empty: 448 rx0_cache_busy: 0 rx0_cache_waive: 0 rx0_congst_umr: 0 rx0_arfs_err: 0 rx0_xdp_tx_xmit: 0 rx0_xdp_tx_full: 0 rx0_xdp_tx_err: 0 rx0_xdp_tx_cqes: 0 rx1_packets: 10 rx1_bytes: 3420 rx1_csum_complete: 10 rx1_csum_unnecessary: 0 rx1_csum_unnecessary_inner: 0 rx1_csum_none: 0 rx1_xdp_drop: 0 rx1_xdp_redirect: 0 rx1_lro_packets: 0 rx1_lro_bytes: 0 rx1_ecn_mark: 0 rx1_removed_vlan_packets: 0 rx1_wqe_err: 0 rx1_mpwqe_filler_cqes: 0 rx1_mpwqe_filler_strides: 0 rx1_buff_alloc_err: 0 rx1_cqe_compress_blks: 0 rx1_cqe_compress_pkts: 0 rx1_page_reuse: 0 rx1_cache_reuse: 0 rx1_cache_full: 0 rx1_cache_empty: 448 rx1_cache_busy: 0 rx1_cache_waive: 0 rx1_congst_umr: 0 rx1_arfs_err: 0 rx1_xdp_tx_xmit: 0 rx1_xdp_tx_full: 0 rx1_xdp_tx_err: 0 rx1_xdp_tx_cqes: 0 rx2_packets: 0 rx2_bytes: 0 rx2_csum_complete: 0 rx2_csum_unnecessary: 0 rx2_csum_unnecessary_inner: 0 rx2_csum_none: 0 rx2_xdp_drop: 0 rx2_xdp_redirect: 0 rx2_lro_packets: 0 rx2_lro_bytes: 0 rx2_ecn_mark: 0 rx2_removed_vlan_packets: 0 rx2_wqe_err: 0 rx2_mpwqe_filler_cqes: 0 rx2_mpwqe_filler_strides: 0 rx2_buff_alloc_err: 0 rx2_cqe_compress_blks: 0 rx2_cqe_compress_pkts: 0 rx2_page_reuse: 0 rx2_cache_reuse: 0 rx2_cache_full: 0 rx2_cache_empty: 448 rx2_cache_busy: 0 rx2_cache_waive: 0 rx2_congst_umr: 0 rx2_arfs_err: 0 rx2_xdp_tx_xmit: 0 rx2_xdp_tx_full: 0 rx2_xdp_tx_err: 0 rx2_xdp_tx_cqes: 0 ... tx0_packets: 1 tx0_bytes: 60 tx0_tso_packets: 0 tx0_tso_bytes: 0 tx0_tso_inner_packets: 0 tx0_tso_inner_bytes: 0 tx0_csum_partial: 0 tx0_csum_partial_inner: 0 tx0_added_vlan_packets: 0 tx0_nop: 0 tx0_csum_none: 1 tx0_stopped: 0 tx0_dropped: 0 tx0_xmit_more: 0 tx0_recover: 0 tx0_cqes: 1 tx0_wake: 0 tx0_cqe_err: 0 tx1_packets: 5 tx1_bytes: 300 tx1_tso_packets: 0 tx1_tso_bytes: 0 tx1_tso_inner_packets: 0 tx1_tso_inner_bytes: 0 tx1_csum_partial: 0 tx1_csum_partial_inner: 0 tx1_added_vlan_packets: 0 tx1_nop: 0 tx1_csum_none: 5 tx1_stopped: 0 tx1_dropped: 0 tx1_xmit_more: 0 tx1_recover: 0 tx1_cqes: 5 tx1_wake: 0 tx1_cqe_err: 0 tx2_packets: 0 tx2_bytes: 0 tx2_tso_packets: 0 tx2_tso_bytes: 0 tx2_tso_inner_packets: 0 tx2_tso_inner_bytes: 0 tx2_csum_partial: 0 tx2_csum_partial_inner: 0 tx2_added_vlan_packets: 0 tx2_nop: 0 tx2_csum_none: 0 tx2_stopped: 0 tx2_dropped: 0 tx2_xmit_more: 0 tx2_recover: 0 tx2_cqes: 0 tx2_wake: 0 tx2_cqe_err: 0 ...

Traffic Control Info

The following TC objects are supported and reported regarding the ingress filters:

The info is provided as one of the following events:

  • Basic filter event

  • Flower/IPv4 filter event

  • Flower/IPv6 filter event

  • Basic action event

  • Mirred action event

  • Tunnel_key/IPv4 action event

  • Tunnel_key/IPv6 action event

General notes:

  • Actions always belong to a filter, so action events share the filter event's ID via the event_id data member

  • Basic filter event only contains textual kind (so users can see which real life objects' support they are lacking)

  • Basic action event only contains textual kind and some basic common statistics if available

Amber Provider

Amber data for both InfiniBand and Ethernet MST devices in amBER format.

Info

MST device names can be found under /dev/mst/.

Note

/dev/mst should be accessible within DTS container.

The following config files are available:

Copy
Copied!
            

amber_devices=DEV1,DEV2,DEV3 # Default:all, or set comma separated list of devices under /dev/mst amber_update_interval_sec=30 # Sample rate for collection amber counters


PPCC_ETH Provider

Programmable congestion control counters are based on an algorithm defined by an end-user, although default algorithms are also available.

Counters are collected per MST device and algorithm parameters.

Info

MST device names can be found under /dev/mst/.

Note

/dev/mst should be accessible within the DTS container.

The counter list depends on the installed MFT version.

Note

/usr/lib64/mft or /usr/lib/mft should be mounted to the DTS container to get the counter list according to the installed MFT version. If not mounted, the internal DTS version of the counters is used.

A comma-separated list of device names is required to enable this provider:

Copy
Copied!
            

ppcc_eth_devices=mt41692_pciconf0,mt41692_pciconf0.1

Assuming the setup is configured by the user, ppcc_eth provider only reads and does not write to device registers.

The following parameter assures the described behaviour.

Copy
Copied!
            

ppcc_read_only=1

The following algorithm parameters are set to default values. In most cases, they should not be changed.

Copy
Copied!
            

ppcc_algo_slot=1 ppcc_algo_param_index=0 ppcc_local_port=1 ppcc_pnat=0 ppcc_lp_msb=0

Info

For more details, consult the official PPCC documentation.

Note

Some of the algo_slots are not implemented:

  • If there are no counters to collect, the device is ignored

  • If there are no devices to collect, the provider is disabled


Fluent Aggregator

fluent_aggr listens on a port for Fluent Bit Forward protocol input connections. Received data can be streamed via a Fluent Bit exporter.

The default port is 42442. This can be changed by updating the following option:

Copy
Copied!
            

fluent-aggr-port=42442


Prometheus Aggregator

prometheus_aggr polls data from a list of Prometheus endpoints.

Each endpoint is listed in the following format:

Copy
Copied!
            

prometheus_aggr_endpoint.{N}={host_name},{host_port_url},{poll_inteval_msec}

Where N starts from 0.

Aggregated data can be exported via a Prometheus Aggr Exporter endpoint.

Network Interfaces

ifconfig collects network interface data. To enable, set:

Copy
Copied!
            

enable-provider=ifconfig

If the Prometheus endpoint is enabled, add the following configuration to cache every collected network interface and arrange the index according to their names:

Copy
Copied!
            

prometheus-fset-indexes=name

Metrices are collected for each network interface as follows:

Copy
Copied!
            

name rx_packets tx_packets rx_bytes tx_bytes rx_errors tx_errors rx_dropped tx_dropped multicast collisions rx_length_errors rx_over_errors rx_crc_errors rx_frame_errors rx_fifo_errors rx_missed_errors tx_aborted_errors tx_carrier_errors tx_fifo_errors tx_heartbeat_errors tx_window_errors rx_compressed tx_compressed rx_nohandler


HCA Performance

hcaperf collects HCA performance data. Since it requires access to an RDMA device, it must use remote collection on the BlueField. On the host, the user runs the container in privileged mode and RDMA device mount.

The counter list is device dependent.

hcaperf DPU Configuration

To enable hcaperf in remote collection mode, set:

Copy
Copied!
            

enable-provider=grpc.hcaperf   # specify HCAs to sample grpc.hcaperf.mlx5_0=sample grpc.hcaperf.mlx5_1=sample

Note

DPE server should be active before changing the dts_config.ini file. See section "Remote Collection" for details.


hcaperf Host Configuration

To enable hcaperf in regular mode, set:

Copy
Copied!
            

enable-provider=hcaperf   # specify HCAs to sample hcaperf.mlx5_0=sample hcaperf.mlx5_1=sample

NVIDIA System Management Interface

The nvidia-smi provider collects GPU and GPU process information provided by the NVIDIA system management interface.

This provider is supported only on x86_64 hosts with installed GPUs. All GPU cards supported by nvidia-smi are supported by this provider.

The counter list is GPU dependent. Additionally, per-process information is collected for the first 20 (by default) nvidia_smi_max_processes processes.

Counters can be either collected as string data "as is" in nvidia-smi or converted to numbers when nvsmi_with_numeric_fields is set.

To enable nvidia-smi provider and change parameters, set:

Copy
Copied!
            

enable-provider=nvidia_smi   # Optional parameters: #nvidia_smi_max_processes=20 #nvsmi_with_numeric_fields=1


NVIDIA Data Center GPU Manager

The dcgm provider collects GPU information provided by the NVIDIA data center GPU manager (DCGM) API.

This provider is supported only on x86_64 hosts with installed GPUs, and requires running the nv-hostengine service (refer to DCGM documentation for details).

DCGM counters are split into several groups by context:

  • GPU – basic GPU information (always)

  • COMMON – common fields that can be collected from all devices

  • PROF – profiling fields

  • ECC – ECC errors

  • NVLINK / NVSWITCH / VGPU – fields depending on the device type

To enable DCGM provider and counter groups, set:

Copy
Copied!
            

enable-provider=dcgm   dcgm_events_enable_common_fields=1 #dcgm_events_enable_prof_fields=0 #dcgm_events_enable_ecc_fields=0 #dcgm_events_enable_nvlink_fields=0 #dcgm_events_enable_nvswitch_fields=0 #dcgm_events_enable_vgpu_fields=0


BlueField Performance

The bfperf provider collects calculated performance counters of BlueField Arm cores. It requires the executable bfperf_pmc, which is integrated in the DOCA BFB bundle of BlueField-3, as well as an active DPE.

To enable BlueField performance provider, set:

Copy
Copied!
            

enable-provider=bfperf

Note

When running, the bfperf provider is expected to recurrently reset the counters of the sysfs.hwmon component. Consider disabling it if bfperf is enabled.


Diagnostic Data

Diagnostic data is comprised of two providers which gather diagnostic data counters from network interface cards (NICs). These providers support the same counters (as defined in a YAML file), but they differ in usage and collection frequency:

The fwctl and mlx5_fwctl drivers (supported on NVIDIA networking devices from BlueField-3 and ConnectX-7 , FW version x.43.1000 onwards) are required for firmware interaction and are part of MLNX_OFED driver. To load them, run:

Copy
Copied!
            

modprobe -a fwctl mlx5_fwctl

This provider utilizes DOCA Telemetry library for data collection. Make sure that the library's prerequisites are met.

Both providers get the counter set from a YAML file.

Diagnostic Data Low Frequency

To enable the diagnostic data low frequency provider, set:

Copy
Copied!
            

enable-provider=diagnostic_data_low_freq

Configure the counter set YAML file (all default files are available in the mounted folder host /opt/mellanox/doca/services/telemetry/config/diagnostic_data_configs).

If there is no such folder, you must update the config folder by running telemetry-init.sh. See "DTS Deployment" section for information.

Copy
Copied!
            

diagnostic-data-yml-file=/config/diagnostic_data_configs/all-single-port.yml

To configure the diagnostic data timestamp collection type, set the following:

Copy
Copied!
            

diagnostic-data-timestamp-collection-type=<method>

Where <method> can be one of the following:

  • no_counters – Do not collect timestamp counters. This is the default method.

  • start_and_end – Collect sample start and end timestamps

  • per_counter – Collect every counter collection timestamp

To configure the clock firmware should use when collecting time stamps, set the following:

Copy
Copied!
            

diagnostic-data-timestamp-source=<clock>

Where <clock> can be one of the following:

  • RTC – Real-time clock (default clock used)

  • RFC – Free-running clock

Diagnostic Data High Frequency

The Diagnostic Data High Frequency provider supports higher sampling frequencies with sub-millisecond resolution, enabling detailed and precise telemetry collection. Due to the large volume of collected data, this provider is designed to run ad-hoc for limited periods, unlike standard DTS providers configured via the DTS configuration file at /opt/mellanox/doca/services/telemetry/config/dts_config.ini.

While the standard DTS flow functions as an endless collect-export loop, High Frequency Telemetry (HFT) operates as an external flow triggered by an HFT HTTP API or by HFT configuration file.

Providers Compatibility

Both low and high frequency providers can run concurrently. The low frequency provider samples at the DTS standard frequency (defined in dts_config.ini), and the high frequency provider samples counters based on the HFT configuration file ( dts_high_freq_config.ini ).

To allow both providers to run concurrently, verify that the counters, the timestamp collection type, and the timestamp collection source are identical. Otherwise, when the high frequency provider starts sampling, the low frequency provider hangs until the end of the HFT session.

HFT HTTP API

The HFT HTTP API allows to start and stop remotely high frequency sampling sessions at scale on devices running DTS, it also allows to get and delete the data as needed.

The API is disabled by default. To enable it, add the following parameter to DTS configuration file /opt/mellanox/doca/services/telemetry/config/dts_config.ini.

Copy
Copied!
            

enable-http-api=true

The default port is 9117. To modify it, set the http-port option with the desired port number.

The general expected API usage is:

  1. Start an HFT ad hoc collection, wait for it to stop or manually stop it. By default, the collected telemetry is stored locally to binary files in the filesystem.

  2. Get the binary data files. The binary data can be read using the /opt/mellanox/collectx/bin/clx_read app, packaged in collectx-clxapidev, a DOCA dependency package.

  3. Delete the collection from DTS host. In any case, DTS runs a configurable retention policy for the collected data files:

    Copy
    Copied!
                

    # by size - set the max size limit of the collection files in bytes. Default is 1GB ad-hoc-runner-max-size-bytes=1073741824 # by time - set the max age of collection files in seconds. Default is 1 week ad-hoc-runner-max-age-seconds=604800 # set the minimum time for collection files to exist. Default is 10 minutes ad-hoc-runner-min-age-seconds=600

Summary

Method

URL

Description

Query Parameters

Has Request Body

POST

/ad-hoc-collection/start

Start an ad hoc collection session. Returns collection ID.

-

Yes

POST

/ad-hoc-collection/stop

Stop active ad hoc collection session

-

No

POST

/ad-hoc-collection/hft-counterset

Post an HFT counter set

filename

Yes

GET

/ad-hoc-collection

Get compressed folder with collection data

collection_id

No

GET

/ad-hoc-collection/list

List collection folders

-

No

DELETE

/ad-hoc-collection

Remove collection data permanently

collection_id

No

Query parameters are key-value pairs appended to the URL with ? and separated by & , for example /URL?key1=value1&key2=value2

Request Body is a JSON containing key-value pairs passed as body of request. For example '{"key1": "value1", "key2": "value2"}'

Response Body is the JSON reply of the server. The "Success Response" section of every endpoint demonstrates the expected response body.

Status Code is 200 for successful requests. In case of errors, a different status code will be returned.

POST /ad-hoc-collection/start

Start ad hoc collection.

Request Body
Info
  • Without a request body, this call will trigger an HFT collection for 30 seconds, in resolution of 10K samples per second, and will write the telemetry to binary data files.

  • Request body is passed as JSON with key-value pairs. all JSON values must be of string type

The following table describes supported parameters in the request body:

Key

Default Value

Description

sample-time-us

100000

Sampling time in microseconds for SW iteration. one SW iteration collects all FW samples

num-iterations

300

Number of iterations

start-time

Current time

Start time for collection. UTC epoch timestamp (in microseconds)

end-time

Calculated based on start-time, num-iterations, and sample-time-us

End time for collection. UTC epoch timestamp (in microseconds)

file-write

true

Whether to write binary files

busy-wait-sampling

false

Whether to use busy wait sampling instead of sleep

prometheus-endpoint

-

Prometheus endpoint URL

fluentbit-config-dir

-

Fluentbit configuration directory

open-telemetry-receiver

-

OpenTelemetry receiver URL

remote-write-receiver

-

Prometheus Remote write receiver URL

hft-counterset

-

Counterset to use. Should be The filename provided to /ad-hoc-collection/hft-counterset.

provider.diagnostic-data-num-samples

1000

Number of diagnostic data samples ( FW parameter )

provider.diagnostic-data-sample-period-nsec

100000

Sample period in nanoseconds ( FW parameter )

provider.diagnostic-data-yml-file

/config/diagnostic_data_configs/all-single-port.yml

Configuration file path. Conflicts with hft-counterset

provider.diagnostic-data-timestamp-collection-type

start_and_end

Type of timestamp collection: [no_counters, start_and_end, per_counter]

provider.diagnostic-data-timestamp-source

RTC

Source for timestamps: [RTC, FRC]


Success Response
Copy
Copied!
            

{ "status": "success", "message": "Collection created", "collection_id": 2 }

The collection_id parameter is generated automatically by this API and used in the GET and DELETE requests.

POST /ad-hoc-collection/stop

Stop active collection.

Success Response

Copy
Copied!
            

{ "status": "success", "message": "Collection stopped successfully" }

POST /ad-hoc-collection/hft-counterset

Post an HFT counterset which can be used by the POST /ad-hoc-collection/start endpoint with the hft-counterset parameter.

Request Body

JSON of key-value strings pairs, keys are the counter names and the value is a string representation of the hexadecimal data ID of that counter.

For example, the following JSON contains two counters

Copy
Copied!
            

{ "port_rx_bytes_0": "0x1020000100000000", "port_rx_packets_0": "0x1020000300000000" }


Query Parameters

Parameter

Description

filename

Name to assign to the requested counterset


Success Response
Copy
Copied!
            

{ "status": "success", "message": "HFT counterset saved successfully", "filename": "my_cset_filename", "overriden": false }

overriden is true if there was already a counterset with this name and it was replaced.

GET /ad-hoc-collection

This request is feasible for collections that were made with file-write: true and were not removed from the system (by DELETE /ad-hoc-collection or the retention policy).

Query Parameters

Parameter

Description

collection_id

Required collection ID


Success Response

Content of tar.gz file. when extracted, a collection_data folder should appear in the working directory. Example with bash:

Copy
Copied!
            

$ curl localhost:9117/ad-hoc-collection?collection_id=2 -o response.tar.gz $ tar xf response.tar.gz $ tree collection_data collection_data/ ├── 2025 │ └── 0401 │ └── c-237-169-100-103 │ ├── diagnostic_data_1743529761189538.bin │ ├── diagnostic_data_1743529761802460.bin │ ├── diagnostic_data_1743529762402948.bin │ ├── diagnostic_data_1743529763003488.bin │ ├── diagnostic_data_1743529763604078.bin │ ├── diagnostic_data_1743529764204606.bin │ ├── diagnostic_data_1743529764805022.bin │ ├── diagnostic_data_1743529765405535.bin │           └── diagnostic_data_1743529766005931.bin └── schema └── schema_c4d0317ee6cecbab995bfbcc237c76b2.json

GET /ad-hoc-collection/list

List the collections available on the file system, to be gathered by GET /ad-hoc-collection.

Success Response

Copy
Copied!
            

{ "status": "success", "num_collections": 3, "collection_ids": [1,2,3] }

DELETE /ad-hoc-collection

Delete data of an ad-hoc collection. Note that in addition to this API there is a configurable retention policy.

Query Parameters

Parameter

Description

Notes

collection_id

The collection ID to delete

0 means delete all


Success Response

Copy
Copied!
            

{ "status": "success", "message": "Collection removed" }

HFT Configuration File

The configuration file is mounted to DTS container, the host path is /opt/mellanox/doca/services/telemetry/config/clx_ad_hoc_runner_config.ini

This configuration file specifies the HFT session's timing parameters, provider settings, and export configurations. HFT allows data export to endpoints or protocols distinct from those used in the standard DTS collection loop. The DTS configuration references the HFT configuration file as an "ad hoc runner," enabling DTS to monitor its status via the following directive:

Copy
Copied!
            

ad-hoc-runner-file=/config/clx_ad_hoc_runner_config.ini

The HFT configuration file serves as both the trigger and definition for HFT sessions. Modifying the file stops the current session and applies the new configuration for the next session. Deleting the file stops any pending HFT sessions entirely.

HFT File Parameters

This table provides the details of the HFT parameters. Refer to section "HFT Configuration File Example" for more helpful tips.

Option

Description

start-time

HFT session start time. If not used, the session starts immediately.

UTC epoch timestamp (in microseconds) or human readable format: HH:MM:SS / HH:MM

end-time

HFT session end time. Ignored if start-time is missing.

If not used, end-time is calculated using num-iterations.

UTC epoch timestamp (in microseconds). or human readable format: HH:MM:SS / HH:MM

num-iterations

Number of iterations.

If not used, start-time and end-time are required, and the number of iterations is calculated.

sample-time-us

Time interval between iterations (in microseconds)

provider

Provider to use. Should be diagnostic_data_high_freq.

file-write

Whether to write collected telemetry to files.

If enabled, could potentially write several MB of data every second.

data-root

Root folder for file writing.

Ignored if file-write=false.

open-telemetry-receiver

Enables export to specified open telemetry receiver

remote-write-receiver

Enables export to specified open telemetry receiver

fluentbit-config-dir

Enables export to fluentbit receivers. By default the folder is the same fluent bit configs folder used by DTS.

Users can specify different folder, as long as it is available in DTS container, according to container volumes.

prometheus-endpoint

Enables in process HTTP server with data cache in prometheus, json and csv format.

This is not recommended for HFT data collection due to high update rate of the data cache

busy-wait-sampling

Set busy wait between iterations (instead of sleep, which is less accurate).

provider.diagnostic-data-num-samples

Number of samples to collect in one iteration. Affects the buffer used by the firmware for diagnostic data.

provider.diagnostic-data-sample-period

Sample period between samples (in nanoseconds). This option specifies the sample interval per iteration, as the provider collects N samples during each iteration.

provider.diagnostic-data-yml-file

The diagnostic data counters YAML file to use

provider.diagnostic-data-timestamp-collection-type

no_counters, start_and_end, or per_counter. Same option as in low frequency provider.

provider.diagnostic-data-timestamp-source

RTC or FRC. Same option as in low frequency provider.


HFT Configuration File Example

Copy
Copied!
            

## DTS configuration file for ad-hoc high frequency collection ## When modified, the file is parsed and applied. ## Note that the folders path is the container path, not the host path.   ## Each section defines a collection. A file may have several sections, each one defines a high frequency collection. ## Section names must be unique and will be used as collection name by clx. [collection-session]   ### Time between samples in microseconds sample-time-us=100000   ### Start time of high frequency collection. Can be in the format HH:MM:SS or HH:MM or as epoch timestamp in microseconds ### Note - in container, the time is in UTC start-time=18:00:00   ### End time of high frequency collection. Can be in the format HH:MM:SS or HH:MM or as epoch timestamp in microseconds ### Note - in container, the time is in UTC end-time=18:01:00 ### Alternatively, you can set the number of iterations. This and start_time field will determine the end time #num-iterations=300   ### Data provider to use provider=diagnostic_data_high_freq   ### Write data to file system. Could potentially fill up the disk file-write=false   ### Root directory to store the data # Ignored if file-write is set to false data-root=/data   ### Enable busy wait between iterations, for a more accurate sample time (default is false) #busy-wait-sampling=true   ### Set prometheus endpoint to enable http endpoint #prometheus-endpoint=http://0.0.0.0:9112   ### Set fluentbit config dir to enable fluentbit export #fluentbit-config-dir=/config/fluent_bit_configs   ### Set open telemetry receiver to enable open telemetry export #open-telemetry-receiver=http://0.0.0.0:9502/v1/metrics   ### Set remote write receiver to enable remote write export #remote-write-receiver=http://0.0.0.0:9090/api/v1/write   ### Provider specific parameters. Format is 'provider.$KEY=$VALUE'. ### The options below are specific to the diagnostic data high frequency provider   # Number of samples to collect on each iteration provider.diagnostic-data-num-samples=1000   # The time period (in nanoseconds) between samples provider.diagnostic-data-sample-period-nsec=100000   # The YAML file with the configuration for the diagnostic data provider provider.diagnostic-data-yml-file=/config/diagnostic_data_configs/all-single-port.yml   # Diagnostic Data timestamp collection type. Options are ['no_counters', 'start_and_end', 'per_counter']. default: 'no_counters' #provider.diagnostic-data-timestamp-collection-type=start_and_end   # Diagnostic Data timestamp source. Options are ['RTC', 'FRC']. default: 'RTC' #provider.diagnostic-data-timestamp-source=FRC

Diagnostic Data YAML File

For compatibility with other related tools, the counter set is defined in YAML format.

There are 4 YAML files within a DTS container (one per permutation of BlueField-3 and ConnectX-7 with dual or single ports). The path to the YAMLs folder is /opt/mellanox/doca/services/telemetry/config/diagnostic_data_configs which is mounted to /config/diagnostic_data_configs.

By default, YAML files include a counter set that is not device-specific. This implies that the same counter set is utilized across all devices by default.

It is possible to assign a specific device within a YAML file; however, this requires maintaining a separate copy of the YAML file for each device. To manage multiple devices, use the diagnostic-data-yml-dir option to specify a directory for YAML files, where each .yml/.yaml file is utilized. This folder should be available to the container under /opt/mellanox/doca/services/telemetry/config .

The following list describes the expected entries in the YAML file:

  • counters – sequence of counters to collect

    • id – counter data ID

    • desc – counter description (optional)

    • unit – name of unit to collect from (optional)

    • name – name of counter to use (optional). If not specified, the generated name is based on the counter description. Otherwise, it is based on the data ID.

  • device – name of the mlx device to collect (optional). If not used, the provider requires a single file containing a list of counters, which it then applies to all available devices on the host.

YAML File Example

The following is the content of the all-dual-port.yml file provided by DTS:

Copy
Copied!
            

counters: - id: 0x1020000100000000 name: port_rx_bytes_0 - id: 0x1020000100000001 name: port_rx_bytes_1 - id: 0x1020000300000000 name: port_rx_packets_0 - id: 0x1020000300000001 name: port_rx_packets_1 - id: 0x1140000100000000 name: port_tx_bytes_0 - id: 0x1140000100000001 name: port_tx_bytes_1 - id: 0x1140000300000000 name: port_tx_packets_0 - id: 0x1140000300000001 name: port_tx_packets_1 - id: 0x1100000100000000 name: port_tx_transport_cnp_sent_packets_0 - id: 0x1100000100000001 name: port_tx_transport_cnp_sent_packets_1 - id: 0x1080000500000000 name: port_rx_transport_cnp_handled_packets_0 - id: 0x1080000500000001 name: port_rx_transport_cnp_handled_packets_1 - id: 0x1080000400000000 name: port_rx_transport_ecn_packets_0 - id: 0x1080000400000001 name: port_rx_transport_ecn_packets_1 - id: 0x1160000b00000000 name: pcie_link_latency_total_read_ns - id: 0x1160000c00000000 name: pcie_link_latency_total_read_packets - id: 0x1160000d00000000 name: pcie_link_latency_max_read_ns - id: 0x1160000e00000000 name: pcie_link_latency_min_read_ns - id: 0x1180000100000000 name: global_icmc_request - id: 0x1180000200000000 name: global_icmc_hit - id: 0x1180000300000000 name: global_icmc_miss

Info

The NVIDIA Adapters Programmer's Reference Manual (PRM) "Diagnostic Data" section defines the rules for data IDs as well as the counter set.

RDMA Notifications

The RDMA Notifications events provider collects notifications from the RDMA firmware and converts them into DTS events for telemetry purposes.

To enable the RDMA notifications provider, add the following line to the DTS configuration file (/opt/mellanox/doca/services/telemetry/config/dts_config.ini):

Copy
Copied!
            

enable-provider=rdma_notifications

Prerequisites

  • RDMA device(s) configured to operate in Ethernet protocol

  • OFED installed

  • ConnectX-7 or BlueField-3 and later

  • Firmware version x.44.0820 or newer

Options

Name

Description

Type

Default

Notes

rdma-notifications-hca

HCA used for receive QP, comma separated for multiple HCAs

String

mlx5_0

rdma-notifications-num-event-indexes

Number of event indexes

Integer

1

This option is relevant for Prometheus Export, in case user wants to store last N events of each type.

For proper indexing of Prometheus export, add the configuration option prometheus-fset-indexes=device_name,idx,syndrome.

rdma-notifications-num-buffers

Number of buffers used by QP

Integer

1000

rdma-notifications-buffer-size

Size of every buffer used by QP

Integer

256

rdma-notifications-syndrome-counter-event-interval-sec

Interval in seconds to export syndrome counter events

Integer

30

See "counter event" in event types section.

rdma-notifications-include-syndrome-zero-counters

Export syndrome counter events if no events are found

Boolean

false

There are potentially 2^7 event types. If enabled, an event per syndrome will be sent every rdma-notifications-syndrome-counter-event-interval-sec.

rdma-notifications-rt-all-vports

Set the corresponding field in RDMA telemetry object

Boolean

true

rdma-notifications-rt-num-vport-ranges

Number of vport ranges

Integer

0

May conflict with rdma-notifications-rt-all-vports option.

rdma-notifications-rt-vport-range-[0-3]-max-id

Vport range maximal ID (inclusive) in RDMA telemetry object

Integer

0

This row is for 4 different options. Use one index in every line.

Example: rdma-notifications-rt-vport-range-0-max-id

rdma-notifications-rt-vport-range-[0-3]-min-id

Vport range maximal ID (inclusive) in RDMA telemetry object

Integer

0

This row is for 4 different options. Use one index in every line.

Example: rdma-notifications-rt-vport-range-0-min-id


Events List

There are two types of events provided by the RDMA notifications:

  • Notification Event – A direct translation of an RDMA notification into one of four possible event types, based on the notification content

  • Counter Event – A periodic aggregation event that reports the total number of events collected for each syndrome

Info

For additional details, refer to the "RDMA Telemetry Notifications" section in the NVIDIA Adapters Programmer's Reference Manual (PRM).

Note

Currently, the CQE with error is the only supported type of RDMA notification.

Notification Events

Additional fields are provided for convenience:

  • guid – A globally unique identifier for the device

  • idx – The event index, determined by the provider option rdma-notifications-num-event-indexes

  • device_name – The name of the RDMA device, based on the devices listed in rdma-notifications-hca

These fields are not specified in the NVIDIA Adapters PRM but are included in the event data to enhance usability.

cqe_with_error_responder_ipv4
Copy
Copied!
            

telemetry_counter msn syndrome qp_type vport_id source_qpn destination_qpn psn timestamp dest_ipv4 node_guid idx device_name


cqe_with_error_responder_ipv6
Copy
Copied!
            

telemetry_counter msn syndrome qp_type vport_id source_qpn destination_qpn psn timestamp dest_ipv6 node_guid idx device_name


cqe_with_error_requestor_ipv4
Copy
Copied!
            

telemetry_counter msn syndrome opcode qp_type vport_id source_qpn destination_qpn psn timestamp dest_ipv4 node_guid idx device_name


cqe_with_error_requestor_ipv6

Copy
Copied!
            

telemetry_counter msn syndrome opcode qp_type vport_id source_qpn destination_qpn psn timestamp dest_ipv6 node_guid idx device_name

Counter Events

Describing the number of events per syndrome, for each device.

cqe_with_error_syndrome_counter
Copy
Copied!
            

syndrome device_name node_guid CQEwE_events

vNIC Provider

To enable the virtual NIC counters provider:

Copy
Copied!
            

enable-provider=vnic

Counters are provided for all the valid Ethernet devices in the devlink dev output.

Counters are retrieved using devlink health diagnose <device_name> reporter vnic .

The exact list of counters depends on the driver version.

The following is an example of a counter list:

Copy
Copied!
            

total_error_queues send_queue_priority_update_flow comp_eq_overrun async_eq_overrun cq_overrun invalid_command quota_exceeded_command generated_pkt_steering_fail handled_pkt_steering_fail

Data Outputs

DTS can send the collected data to the following outputs:

Data Writer

The data writer is disabled by default to save space on BlueField. Steps for activating data write during debug can be found under section Enabling Data Output.

The schema folder contains JSON-formatted metadata files which allow reading the binary files containing the actual data. The binary files are written according to the naming convention shown in the following example (apt install tree):

Copy
Copied!
            

tree /opt/mellanox/doca/services/telemetry/data/ /opt/mellanox/doca/services/telemetry/data/ ├── {year} │ └── {mmdd} │ └── {hash} │ ├── {source_id} │ │ └── {source_tag}{timestamp}.bin │ └── {another_source_id} │ └── {another_source_tag}{timestamp}.bin └── schema └── schema_{MD5_digest}.json

New binary files appears when the service starts or when binary file age/size restriction is reached. If no schema or no data folders are present, refer to the Troubleshooting section.

Note

source_id is usually set to the machine hostname. source_tag is a line describing the collected counters, and it is often set as the provider's name or name of user-counters.

Reading the binary data can be done from within the DTS container using the following command:

Copy
Copied!
            

crictl exec -it <Container ID> /opt/mellanox/collectx/bin/clx_read -s /data/schema /data/path/to/datafile.bin

Note

The path to the data file must be an absolute path.

Example output:

Copy
Copied!
            

{ "timestamp": 1634815738799728, "event_number": 0, "iter_num": 0, "string_number": 0, "example_string": "example_str_1" } { "timestamp": 1634815738799768, "event_number": 1, "iter_num": 0, "string_number": 1, "example_string": "example_str_2" } …


Prometheus

The Prometheus endpoint keeps the most recent data to be pulled by the Prometheus server and is enabled by default.

To check that data is available, run the following command on BlueField:

Copy
Copied!
            

curl -s http://0.0.0.0:9100/metrics

The command dumps every counter in the following format:

Copy
Copied!
            

counter_name {list of meta fields} counter_value timestamp

Additionally, endpoint supports JSON and CSV formats:

Copy
Copied!
            

curl -s http://0.0.0.0:9100/json/metrics curl -s http://0.0.0.0:9100/csv/metrics

Note

The default port for Prometheus can be changed in dts_config.ini.

Configuration Details

Prometheus is configured as a part of dts_config.ini.

By default, the Prometheus HTTP endpoint is set to port 9100. Comment this line out to disable Prometheus export.

Copy
Copied!
            

prometheus=http://0.0.0.0:9100

Prometheus can use the data field as an index to keep several data records with different index values. Index fields are added to Prometheus labels.

Copy
Copied!
            

# Comma-separated counter set description for Prometheus indexing: #prometheus-indexes=idx1,idx2   # Comma-separated fieldset description for prometheus indexing #prometheus-fset-indexes=idx1,idx2

The default fset index is device_name. It allows Prometheus to keep ethtool data up for both the p0 and p1 devices.

Copy
Copied!
            

prometheus-fset-indexes=device_name

If fset index is not set, the data from p1 overwrites p0's data.

For quick name filtering, the Prometheus exporter supports being provided with a comma-separated list of counter names to be ignored:

Copy
Copied!
            

#prometheus-ignore-names=counter_name1,counter_name_2

For quick filtering of data by tag, the Prometheus exporter supports being provided with a comma-separated list of data source tags to be ignored.

Users should add tags for all streaming data since the Prometheus exporter cannot be used for streaming. By default, FI_metrics are disabled.

Copy
Copied!
            

prometheus-ignore-tags=FI_metrics


Prometheus Aggregator Exporter

Prometheus aggregator exporter is an endpoint that keeps the latest aggregated data using prometheus_aggr.

This exporter labels data according to its source.

To enable this provider, users must set 2 parameters in dts_config.ini:

Copy
Copied!
            

prometheus-aggr-exporter-host=0.0.0.0 prometheus-aggr-exporter-port=33333

Fluent Bit

Fluent Bit allows streaming to multiple destinations. Destinations are configured in .exp files that are documented in-place and can be found under:

Copy
Copied!
            

/opt/mellanox/doca/services/telemetry/config/fluent_bit_configs

Fluent Bit allows exporting data via "Forward" protocol which connects to the Fluent Bit/FluentD instance on customer side.

Export can be enabled manually:

  1. Uncomment the line with fluent_bit_configs=… in dts_config.ini.

  2. Set enable=1 in required .exp files for the desired plugins.

  3. Additional configurations can be set according to instructions in the .exp file if needed.

  4. Restart the DTS.

  5. Set up receiving instance of Fluent Bit/FluentD if needed.

  6. See the data on the receiving side.

Export file destinations are set by configuring .exp files or creating new ones. It is recommended to start by going over documented example files. Documented examples exist for the following supported plugins:

  • forward

  • file

  • stdout

  • kafka

  • es (elastic search)

  • influx

Note

All .exp files are disabled by default if not configured by initContainer entry point through .yaml file.

Note

To forward the data to several destinations, create several forward_{num}.exp files. Each of these files must have their own destination host and port.

Export File Configuration Details

Each export destination has the following fields:

  • name – configuration name

  • plugin_name – Fluent Bit plugin name

  • enable – 1 or 0 values to enable/disable this destination

  • host – the host for Fluent Bit plugin

  • port – port for Fluent Bit plugin

  • msgpack_data_layout – the msgpacked data format. Default is flb_std. The other option is custom. See section Msgpack Data Layout for details.

  • plugin_key=val – key-value pairs of Fluent Bit plugin parameter (optional)

  • counterset/fieldset – file paths (optional). See details in section Cset/Fset Filtering.

  • source_tag=source_tag1,source_tag2 – comma-separated list of data page source tags for filtering. The rest tags are filtered out during export. Event tags are event provider names. All counters can be enabled/disabled only simultaneously with a counters keyword.

Note

Use # to comment a configuration line.


Msgpack Data Layout

Data layout can be configured using .exp files by setting msgpack_data_layout=layout. There are two available layouts: Standard and Custom.

The standard flb_std data layout is an array of 2 fields:

  • timestamp double value

  • a plain dictionary (key-value pairs)

The standard layout is appropriate for all Fluent Bit plugins. For example:

Copy
Copied!
            

[timestamp_val, {"timestamp"->ts_val, type=>"counters/events", "source"=>"source_val", "key_1"=>val_1, "key_2"=>val_2,...}]

The custom data layout is a dictionary of meta-fields and counter fields. Values are placed into a separate plain dictionary. Custom data format can be dumped with stdout_raw output plugin of Fluent-Bit installed or can be forwarded with forward output plugin.

Counters example:

Copy
Copied!
            

{"timestamp"=>timestamp_val, "type"=>"counters", "source"=>"source_val", "values"=> {"key_1"=>val_1, "key_2"=>val_2,...}}

Events example:

Copy
Copied!
            

{"timestamp"=>timestamp_val, "type"=>"events", "type_name"=>"type_name_val", "source"=>" source_val", "values"=>{"key_1"=>val_1, "key_2"=>val_2,...}}


Cset/Fset Filtering

Each export file can optionally use one cset and one fset file to filter DTS counters and events data.

  • cset contains tokens per line to filter data with "type"="counters".

  • fset contains several blocks started with the header line [event_type_name] and tokens under that header. An Fset file is used to filter data with "type"="events".

    Note

    Event type names could be prefixed to apply the same tokens to all fitting types. For example, to filter all ethtool events, use [ethtool_event_*].

If several tokens must be matched simultaneously, use <tok1>+<tok2>+<tok3>. Exclusive tokens are available as well. For example, the line <tok1>+<tok2>-<tok3>-<tok4> filters names that match both tok1 and tok2 and do not match tok3 or tok4.

The following are the details of writing cset files:

Copy
Copied!
            

# Put tokens on separate lines # Tokens are the actual name 'fragments' to be matched # port$ # match names ending with token "port" # ^port # match names starting with token "port" # ^port$ # include name that is exact token "port # port+xmit # match names that contain both tokens "port" and "xmit" # port-support # match names that contain the token "port" and do not match the "-" token "support" # # Tip: To disable counter export put a single token line that fits nothing

The following are the details of writing fset files:

Copy
Copied!
            

# Put your events here # Usage: # # [type_name_1] # tokens # [type_name_2] # tokens # [type_name_3] # tokens # ... # Tokens are the actual name 'fragments' to be matched # port$ # match names ending with token "port" # ^port # match names starting with token "port" # ^port$ # include name that is exact token "port # port+xmit # match names that contain both tokens "port" and "xmit" # port-support # match names that contain the token "port" and do not match the "-" token "support"   # The next example will export all the "tc" events and all events with type prefix "ethtool_" "ethtool" are filtered with token "port": # [tc] # # [ethtool_*] # packet   # To know which event type names are available check export and find field "type_name"=>"ethtool_event_p0" # ... # Corner cases: # 1. Empty fset file will export all events. # 2. Tokens written above/without [event_type] will be ignored. # 3. If cannot open fset file, warning will be printed, all event types will be exported.

NetFlow Exporter

NetFlow exporter must be used when data is collected as NetFlow packets from the telemetry client applications. In this case, DOCA Telemetry Exporter NetFlow API sends NetFlow data packages to DTS via IPC. DTS uses NetFlow exporter to send data to the NetFlow collector (3rd party service).

To enable NetFlow exporter, set netflow-collector-ip and netflow-collector-port in dts_config.ini. netflow-collector-ip could be set either to IP or an address.

For additional information, refer to the dts_config.ini file.

Open Telemetry Exporter

DTS is capable of streaming telemetry data towards an Open Telemetry receiver using the HTTP-based OTLP metrics protocol.

The Open Telemetry exporter is disabled by default and can be configured via dts_config.ini.

To enable the telemetry data streaming in the form of metrics, set the destination of the OTLP data streaming (i.e., the Open Telemetry receiver):

Copy
Copied!
            

open-telemetry-receiver=http://0.0.0.0:9502/v1/metrics

This example expects the running Open Telemetry receiver to be bound to port 9502 on the host running the DTS instance. Section "Open Telemetry Metrics Receiver Sample Configuration" provides an example of the Open Telemetry receiver configuration.

Note

OTLP exporter implementation is limited to HTTP-based communication with the data payload in JSON form.

The Open Telemetry exporter can be configured to apply counter-set or field-set to the data stream, similar to the Fluent Bit exporter:

Copy
Copied!
            

open-telemetry-counter-set=slow_counters open-telemetry-field-set=slow_counters

The Open Telemetry exporter sends data in bulk, combining bursts when possible. By default, the size of the bulk is up to 100 data points. If desirable, the size of the bulk can be altered using the open-telemetry-bulk-size configuration parameter. For example:

Copy
Copied!
            

open-telemetry-bulk-size=20

To set the start timestamp of DTS, add:

Copy
Copied!
            

open-telemetry-set-start-timestamp=true

To set the description field of the exported data, add:

Copy
Copied!
            

open-telemetry-with-description=true

The default serialization logic uses a customized JSON encoder. The following parameters use the official protobuf serializer and encode it as protobuf rather than JSON:

Copy
Copied!
            

open-telemetry-fast-serializer=false open-telemetry-binary-protobuf=true

Open Telemetry Metrics Receiver Sample Configuration

The following is a sample Open Telemetry server configuration file (collector-config.yaml):

Copy
Copied!
            

receivers:   otlp:     protocols:     http:         endpoint: 0.0.0.0:9502   exporters:   debug:     verbosity: detailed   service:   pipelines:   metrics:       receivers: [otlp]     exporters: [debug]

To run an Open Telemetry instance:

Copy
Copied!
            

docker run --rm --name "$(whoami)_open_telemetry" -p 9502:9502 \     -v $(pwd)/data:/data -v $(pwd)/collector-config.yaml:/etc/otelcol/config.yaml otel/opentelemetry-collector

Prometheus Remote Write Exporter

DTS can stream the telemetry data towards an external Prometheus service with an enabled metrics receiver. If enabled, the DTS data exporter acts as a Prometheus remote write protocol "Sender", streaming telemetry data towards a Prometheus server using remote write protocol.

Info

Refer to Prometheus Remote Write Specification for more information.

To enable telemetry data streaming:

Copy
Copied!
            

remote-write-receiver=http://0.0.0.0:9090/api/v1/write

This example assumes the running Prometheus remote write receiver to be bound to port 9090 on the host running the DTS instance.

For example, a Prometheus remote write receiver could be run using the following command:

Copy
Copied!
            

docker run -p 9090:9090 prom/prometheus --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries \ --web.console.templates=/usr/share/prometheus/consoles --web.enable-remote-write-receiver

The Prometheus remote write exporter can be configured to apply counter-set or field-set to the data stream, similar to the Open Telemetry exporter:

Copy
Copied!
            

remote-write-counter-set=slow_counters remote-write-field-set=slow_counters

The Prometheus remote write exporter sends data in bulk, combining bursts when possible. By default, the size of the bulk is up to 100 data points. If necessary, the size of the bulk can be altered using the bulk-size configuration parameter. For example:

Copy
Copied!
            

remote-write-bulk-size=20


Load Balancer Exporter

The load balancer exporter is an exporter which distributes or copies data between multiple instances of another (secondary) exporter.

For example, the number of instances may be set as follows depending on the use case:

Variable

Description

Default

Example

Required

Notes

loadbalancer-exporter-name

Name of the secondary exporter to load: open_telemetry, remote_write

N/A

open_telemetry

Yes

loadbalancer-num-instances

Number of instances to create of the secondary exporter

N/A

2

Yes

Inferred when using loadbalancer-INDEX-KEY parameters

loadbalancer-mode

Balancing mode. Possible values: distribution; replication.

distribution

replication

No

loadbalancer-INDEX-KEY

General prefix for key-value parameters to specific export instance

N/A

loadbalancer-0-open-telemetry-receiver=http://0.0.0.0:9502/v1/metrics

No

Index is 0-based.

KEY expected be an option supported of the used exporter.

See exporter description for list of options.

loadbalancer-exporter-config-var

Variable name to substitute for instances of the secondary exporter

N/A

open-telemetry-receiver

No

Will be deprecated. Use loabalancer-INDEX-KEY instead.

Note

If any of the required variables is missing, the load balancer will not start.

When loadbalancer-INDEX-KEY and loadbalancer-exporter-config-var are not used, all instances are created equal, and their configuration is done according to other available configuration. If none of the instance configuration variables exist, that instance is created with other available configuration.

For example, the following is a section of the dts_config.ini configuration file which provides a sample of enabling load balancer to run 2 OTLP exporter instances:

Copy
Copied!
            

loadbalancer-exporter-name=open_telemetry loadbalancer-mode=replication loadbalancer-0-open-telemetry-receiver=http://10.141.160.210:9502/v1/metrics loadbalancer-1-open-telemetry-receiver=http://10.141.160.211:9502/v1/metrics

The default behavior is to export the entire collected data. To restrict the export interval of different instances (multirate export), add the required interval in seconds:

Copy
Copied!
            

loadbalancer-0-open-telemetry-export-interval=30 loadbalancer-1-open-telemetry-export-interval=60


Distributed Real Time Analysis Exporter

The Real Time Analysis (RTA) Exporter is a powerful tool designed to export real-time analytics data from DTS. It provides seamless integration with various data sources and destinations, allowing you to efficiently collect, process, and export analytics information in real-time. One of its key features is the ability to run an HTTP server at a preconfigured port, allowing for remote management of Lua scripts used in data processing.

It allows to get relevant insights based on telemetry data without the overhead of aggregation and central analysis. Potential use cases can be running link health tests (by analyzing L1 data) before executing an AI job (saving cluster time by avoiding starting a job on a bad link), or any other custom logic that is able to run on-demand \ on-going and uses telemetry data as input.

To enable this exporter, the lua scripts folder path (in DTS container filesystem) should be specified in DTS config file

Copy
Copied!
            

lua-script-dir=/config/rta/lua_scripts

The default DTS configuration folder contains several Lua scripts that can be used as an example. The section below describes the API

Note

This provider can run an HTTP server for RESTful interface of Lua scripts management.

Below are the parameters that can be modified to change the default logic:

Copy
Copied!
            

rta-enable-http-api=true rta-http-port=1812

Additional Configuration Parameters

Option Name

Description

Example

rta-inqueue

Size of the inbound data page processing queue. Default is 10.

5

rta-outqueue

Size of the outgoing Prometheus write queue. Default is 1000.

5000

rta-threads

Number of threads to run the remote write exporter. Default is 1.

2

rta-counter-set

Name of the counter set to apply to the data stream.

low_freq

rta-field-set

Name of the field set to apply to the data stream.

low_freq

rta-metrics-capacity

Defines the default maximum size of the buffer that stores the most recent metric values.

16

rta-max-metrics-capacity

Maximum capacity for metrics storage

10000

rta-enable-http-api

Enables RTA HTTP API requests.

true

rta-http-port

RTA HTTP server port.

1814

rta-ufm-events-endpoint

(In case UFM is running) URL of the UFM events endpoint for posting external events.

https://r-ufm114/ufmRestV3/app/events/external_events

rta-ufm-access-token

(In case UFM is running) Access token used for authentication when posting events to UFM.

fJiq6mvCjMiQn6ZFwmKJxWygd8O2pX

Corresponds to r-ufm114

rta-skip-unchanged-data-points

Skips unchanged data points during processing if set to true.

true

rta-script-log-lines-size

Maximum number of log lines to keep per script

1000

rta-lua-disallow-list

Comma-separated list of forbidden Lua functions

io.open,io.popen,os.execute,dofile,loadfile,require

rta-lua-allow-functions-list

Comma-separated list of allowed Lua functions for scripts

print,ipairs,pairs,type,tostring,tonumber

rta-lua-allow-libraries-list

Comma-separated list of allowed Lua libraries for scripts

math,string,table


Lua Script Requirements

  • If the script implements the isEnabled() function, it must return true for the script to be enabled. If this function is not implemented, the script will be disabled by default.

  • Scripts must provide a set of metric names to be filtered for processing by implementing the getMetricNames() function.

  • If a script is disabled, doesn't implement getMetricNames(), or returns an empty set of metric names, it will not be loaded.

Lua Scripts Workflow

The RTA Exporter plugin processes data in two ways:

    1. Periodic:

      • At the end of each data page, the plugin calls the processDataPageCompleted() Lua function.

      • This function allows the Lua script to process the collected data.

    2. On demand via http server - see <link>

Lua Scripts API

There are 2 directions of function calls:

  1. DTS calls lua script functions

  2. Lua script calls DTS functions

Lua script functions

2 functions are required - isEnabled and getMetricNames

isEnabled()

Determines if the script should be loaded.

Copy
Copied!
            

function isEnabled()     return true -- or false end


getMetricNames()

Provides a set of metric names to be filtered for processing.

Copy
Copied!
            

function getMetricNames()     return {"metric1""metric2""metric3"} end


processDataPageCompleted()

Processes collected data at the end of each data page.

Copy
Copied!
            

function processDataPageCompleted()     -- Implementation for processing data end


getMetricsCapacity()

Defines the maximum size of the buffer that stores the most recent metric values.

Copy
Copied!
            

function getMetricsCapacity()     return 20 -- Example: Set the buffer size to 20 entries end


processChangedMetricsOnly()

This function instructs the host application (CLX) to provide only metrics that have changed since the last time the script accessed them.

Copy
Copied!
            

function processChangedMetricsOnly()     return true -- Receive only updated metrics data end

  • Purpose: Optimizes data processing by instructing the host application to provide only metrics with new values since the script last accessed them. This can significantly improve performance and reduce unnecessary data transfer.

  • Return value:

    • true: The host application will provide only metrics that have changed since the last access by the script.

    • false: The host application will provide all metrics, regardless of whether they've changed.

processDataMinPeriodMs()

Returns the minimum delay in milliseconds between calls to processDataPageCompleted(). This function helps reduce the frequency of calls if data pages are completed too quickly.

Copy
Copied!
            

function processDataMinPeriodMs()     return 5000 -- Example: Ensure processDataPageCompleted() is called at least 5 seconds apart end

  • Purpose: This function allows you to control maximum frequency at which processDataPageCompleted() is called when multiple data pages are completed in rapid succession.

  • Note: The frequency of data pages becoming ready for processing is controlled by the CLX configuration. If the processDataMinPeriodMs() value is lower than the interval at which data pages are completed (as set by CLX), processDataPageCompleted() will be called on each data page completion, as the delay condition will always be met.

  • If data pages are completed more frequently than the specified delay, processDataPageCompleted() will be called less often to prevent excessive processing.

processData()

Processes data on demand when requested via the HTTP API.

Copy
Copied!
            

function processData()     -- Your logic here to process data     -- For example, let's assume a simple response     return "Data processed successfully","text/plain; charset=utf-8" end

The processData() function is an optional function in Lua scripts that is only required when the script is executed on demand. It processes data and returns a response. When implemented, it must return two values:

  1. Response Content (string): The actual data or message to be sent back

  2. Content Type (string): Specifies how the response should be interpreted

Return Values

  • First Value: The response content as a string

  • Second Value: The content type as a string (e.g., "text/plain; charset=utf-8")

Content Type Examples

  • "text/plain; charset=utf-8" - For plain text responses

  • "text/html; charset=utf-8" - For HTML responses

  • "application/json" - For JSON responses

  • Purpose: This function allows scripts to handle on-demand data processing requests initiated through the RTA HTTP API.

  • Note: The processData() function is called independently of the regular data page processing cycle and is used for ad-hoc data processing tasks.

DTS functions that can be called from Lua script

The RTA Exporter plugin provides several functions implemented by DTS that allow Lua scripts to interact with metrics data. These functions are prefixed with clx_ and are designed to be called from within the processDataPageCompleted() and processData() functions in your Lua scripts.

clx_get_updated_metric_names(metricNames)

This function returns a list of metric names that have been updated since the last access.

Copy
Copied!
            

function clx_get_updated_metric_names(metricNames)

  • Parameters:

    • metricNames: A table of metric names to check for updates.

  • Returns:

    • A table containing the names of metrics that have been updated.

clx_create_label_sets_iterator(metric_name, skip_unchanged)

This function creates an iterator for label sets associated with a given metric.

Copy
Copied!
            

for label_set_index, labels in clx_create_label_sets_iterator(metric_name, skip_unchanged) do     -- Process data end

  • Parameters:

    • metric_name: The name of the metric to iterate over.

    • skip_unchanged: A boolean indicating whether to skip label sets that haven't changed.

  • Returns:

    • An iterator that yields pairs of label_set_index and labels for the specified metric.

clx_get_last_data_points(metric_name, label_set_index)

Retrieves both timestamps and corresponding values for a specific metric and label set index.

Copy
Copied!
            

local timestamps, values = clx_get_last_data_points(metric_name, label_set_index)

  • Parameters:

    • metric_name: The name of the metric.

    • label_set_index: The index of the label set associated with the metric.

  • Returns:

    • timestamps: A table of timestamps corresponding to the data points.

    • values: A table of values corresponding to the timestamps.

clx_get_last_metric_values_by_index(metric_name, label_set_index, n)

Retrieves the last n values for a specific metric and label set index.

Copy
Copied!
            

local values = clx_get_last_metric_values_by_index(metric_name, label_set_index, n)

  • Parameters:

    • metric_name: The name of the metric.

    • label_set_index: The index of the label set associated with the metric.

    • n: The number of last values to retrieve.

  • Returns:

    • A table containing the last n values for the specified metric and label set index.

clx_get_labels_set(label_set_index)

Retrieves the labels set for a given label set index.

Copy
Copied!
            

local labels = clx_get_labels_set(label_set_index)

  • Parameters:

    • label_set_index: The index of the label set to retrieve.

  • Returns:

    • A table containing the labels set for the specified index.

clx_get_last_metric_values(metric_name, labels, n)

This function retrieves the last n values for a specific metric and label set.

Copy
Copied!
            

function clx_get_last_metric_values(metric_name, labels, n)

  • Parameters:

    • metric_name: The name of the metric.

    • labels: The label set associated with the metric.

    • n: The number of last values to retrieve.

  • Returns:

    • A table containing the last n values for the specified metric and label set.

clx_get_all_metrics_data_points(label_set_index, n)

This function retrieves historical data points for a set of metrics

Copy
Copied!
            

local timestamps, values = clx_get_all_metrics_data_points(label_set_index, n)

  • Parameters:

    • label_set_index: number - Index of the label set to get data for

    • n: number - Maximum number of data points to retrieve per metric

  • Returns:

    • timestamps_table: table - Array of timestamps for each metric

    • values_table: table - Array of values for each metric

  • Usage: Used to access historical metric data for analysis

  • Example:

    Copy
    Copied!
                

    local timestamps, values = clx_get_all_metrics_data_points(label_set_index, 2) if timestamps and values then     for i, metric_name in ipairs(metricNames) do         if values[i] and #values[i] > 0 then             local last_value = values[i][#values[i]]             -- Process the value         end     end end

clx_post_ufm_event(event_dictionary)

Posts a UFM external event and returns the response. (This is relevant in case UFM is running).

Copy
Copied!
            

local response = clx_post_ufm_event(event_dictionary)

  • Parameters:

  • Returns:

    • The UFM external event response if successful, or an error string if the operation fails.

clx_log_info(...)

Logs an informational message.

Copy
Copied!
            

clx_log_info("Informational message %s %d""Additional context"123)

  • Parameters:

    • ...: Variable number of arguments to log. These can be strings, numbers, or other types that can be converted to strings.

clx_log_warning(...)

Logs a warning message.

Copy
Copied!
            

clx_log_warning("Warning message %s %d""Additional context"456)

  • Parameters:

    • ...: Variable number of arguments to log.

clx_log_error(...)

Logs an error message.

Copy
Copied!
            

clx_log_error("Error message %s %d""Additional context"789)

  • Parameters:

    • ...: Variable number of arguments to log.

clx_log_debug(...)

Logs a debug-level message, useful during development and troubleshooting.

Copy
Copied!
            

clx_log_debug("Debugging details %s %d""Additional context"101112)

  • Parameters:

    • ...: Variable number of arguments to log.

Alternative Logging Functions

The following functions provide logging capabilities similar to Lua's print() function. They accept variadic arguments and automatically concatenate them into a single string for logging:

  • clx_log_print_info(...): Logs informational messages.

  • clx_log_print_warning(...): Logs warning messages.

  • clx_log_print_error(...): Logs error messages.

  • clx_log_print_debug(...): Logs debug-level messages.

Expected Arguments:

  • These functions accept a variable number of arguments (...) without requiring modifiers for formatting.

  • Arguments can be strings, numbers, or other types convertible to strings, and they are concatenated into a single log message.

Usage Example #1

Here's how you might use these logging functions within your Lua script:

Copy
Copied!
            

function processDataPageCompleted()   clx_log_info("Data page processing started with %s %s", #getMetricNames(), "metrics.") end


Usage Example #2

Here's an updated example of how these functions should be used within the processDataPageCompleted() function:

Copy
Copied!
            

function processDataPageCompleted()    local metricNames = getMetricNames()    local updatedMetrics = clx_get_updated_metrics_names(metricNames)     for _, metric_name in ipairs(updatedMetrics) do      for label_set_index, labels in clx_create_label_sets_iterator(metric_name, truedo        local lastValues = clx_get_last_metric_values_by_index(metric_name, label_set_index, 5)       -- Process the last 5 values and labels for this metric and label set      end    end end

This example demonstrates the correct usage of the updated and new host application functions within processDataPageCompleted(). It shows how to:

  1. Iterate over updated metrics and their label sets.

  2. Retrieve the last 5 values for each metric and label set combination using the label set index.

Best Practices

Remember to call these functions only within processDataPageCompleted() to ensure access to the most recent and consistent metrics data.

  1. It's recommended to return true from processChangedMetricsOnly() in most cases to receive only updated metrics data, improving efficiency.

  2. Use false only when your script specifically needs to process all metrics on each data page completion, regardless of changes.

  3. Ensure your script's logic can handle receiving and processing only a subset of metrics when this function returns true.

  4. Be aware that returning true may result in receiving fewer metrics per processing cycle, but these metrics will always be the most recently updated ones.

  5. Use getMetricsCapacity() to control memory usage and performance by limiting the number of stored metric values.

  6. Use processData() to handle on-demand data processing tasks initiated via the HTTP API's Run Script command.

  7. Ensure your script's logic can handle both regular data page processing and on-demand requests independently.

  8. Be aware that processData() is called outside of regular processing cycles, so it should be designed for standalone execution.

HTTP REST API

List

  • Purpose: Retrieves a list of available Lua scripts.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "list".

    Copy
    Copied!
                

    {   "scriptCommand""list" }

  • Response: A JSON array containing the base file names (without path or extension) of the available Lua scripts.

Add

  • Purpose: Submits a request to add a new Lua script to the system. The actual addition is performed at the earliest opportunity, typically at the beginning of the next incoming data page processing cycle.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "add", scriptName, and scriptContent.

    Copy
    Copied!
                

    {   "scriptCommand""add",   "scriptName""example_script"// Optional   "scriptContent""Lua script content here" }

    • If scriptName is provided, the script will be saved with that name to the directory containing your Lua scripts.

    • If scriptName is not provided (or empty), the script content will be saved to a temporary file. The lifecycle of such scripts will be tied to the RTA Exporter's lifecycle, meaning they will be automatically removed when the RTA Exporter terminates.

  • Response: A success message indicating that the request has been queued for processing.

Remove

  • Purpose: Submits a request to remove an existing and enabled Lua script from the system. The actual removal is performed at the earliest opportunity, typically at the beginning of the next incoming data page processing cycle.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "remove" and scriptName.

    Copy
    Copied!
                

    {   "scriptCommand""remove",   "scriptName""example_script" }

    Important: Only enabled (active and running) Lua scripts that exist within the configured Lua scripts directory can be removed using this command. Attempts to remove scripts outside of this directory or scripts that are not enabled will be disregarded.

  • Response: A success message indicating that the request has been queued for processing.

Run

  • Purpose: Submits a request to execute a Lua script immediately. The script is executed directly.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "run", optionally scriptName, and scriptContent.

    Copy
    Copied!
                

    {   "scriptCommand""run",   "scriptName""example_script"// Optional   "scriptContent""Lua script content here"  // Used if scriptName is not provided }

    • If scriptName is provided, the existing script with that name will be executed.

    • If scriptName is not provided (or empty), the script content specified in scriptContent will be executed directly.

  • Response: Returns the result of the processData() function execution if successful, or an error message if any error condition occurs during execution.

  • Note: The Lua script must implement a function named processData() which is called by this Run request during execution. If this function is not present, execution will fail.

Reload Scripts

  • Purpose: Submits a request to reload all Lua scripts from the configured scripts directory. This command does not perform reload immediately but queues it for execution at the earliest opportunity, typically at the beginning of the next incoming data page processing cycle.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "reloadScripts".

    Copy
    Copied!
                

    {   "scriptCommand""reloadScripts" }

  • Response: A success message indicating that the reload request has been queued for processing, or an error message if any issue occurs during queuing.

Show Script Log

  • Purpose: Retrieves the log entries for a specified Lua script.

  • Method: POST

  • Request Body: A JSON object with the scriptCommand set to "log" and scriptName.

    Copy
    Copied!
                

    {   "scriptCommand""log",   "scriptName""example_script" }

    • Important: Only existing and enabled Lua scripts can be queried using this command. Attempts to query non-existent or disabled scripts will return an empty log.

  • Response: A JSON object containing the log entries for the specified script, or an empty log if the script does not exist, is not enabled, or if there are no log entries.

Alternative Endpoints

In addition to the /rta/lua/scripts/cmd endpoint, the following endpoints provide a simpler way to perform common operations:

  • Add Script:

    bash

    curl -X POST http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/script/add/example_script \ -H "Content-Type: text/plain" \ -d 'print("Hello, Lua!")'

  • Remove Script:

    bash

    curl -X DELETE http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/script/remove/example_script

  • Show Script Log:

    bash

    curl -X GET http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/script/showlog/example_script

  • Run Script (by Name):

    bash

    curl -X GET http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/script/run/example_script

  • Run Script (with Content):

    bash

    curl -X POST http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/script/run \ -H "Content-Type: text/plain" \ -d 'function processData() print("Processing Data") end'

  • List Scripts:

    bash

    curl -X GET http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/scripts/list

  • Reload Scripts:

    bash

    curl -X GET http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/scripts/reload

Execution Timing

Note that commands like add, remove, and reloadScripts are not executed immediately. Instead, they are queued and performed at the earliest opportunity, typically at the beginning of the next incoming data page processing cycle. This ensures that script management operations do not interfere with ongoing data processing tasks. The run command executes scripts immediately.

Error Handling

  • Invalid or Missing Command: If an unsupported scriptCommand is provided or if scriptCommand is not specified, the endpoint will return an error message indicating that the command is not recognized.

  • Missing Arguments: If required arguments are missing for any command, the endpoint will return an error message specifying the missing fields.

  • Script Existence: For the add command, if a script with the same name already exists, the endpoint will overwrite the existing script.

  • Script Removal: For the remove command, if the specified script does not exist within the configured Lua scripts directory or is not enabled, the request will be disregarded without error.

  • Script Execution: For the run command:

    • If execution fails due to missing or invalid code (e.g., missing processData() function), an error message will be returned.

  • Script Reload Request:

    • If any issue occurs during queuing of reload requests (e.g., invalid configuration), an error message will be returned.

Security Considerations

  • Authentication: Ensure that appropriate authentication mechanisms are in place to restrict access to this endpoint.

  • Input Validation: Always validate the input data to prevent potential security vulnerabilities such as script injection.

Example Usage

  • List Scripts:

    Copy
    Copied!
                

    curl -X POST http://localhost:1814/rta/lua/scripts/cmd \         -H "Content-Type: application/json" \         -d '{"scriptCommand": "list"}'

  • Add Script:

    Copy
    Copied!
                

    curl -X POST http://localhost:1814/rta/lua/scripts/cmd \         -H "Content-Type: application/json" \         -d '{"scriptCommand": "add", "scriptName": "example", "scriptContent": "print(\"Hello, Lua!\")"}'

  • Remove Script:

    Copy
    Copied!
                

    curl -X POST http://localhost:1814/rta/lua/scripts/cmd \         -H "Content-Type: application/json" \         -d '{"scriptCommand""remove""scriptName""example"}

  • Run Script:

    Copy
    Copied!
                

    curl -X POST http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/scripts/cmd \         -H "Content-Type: application/json" \         -d '{"scriptCommand": "run", "scriptContent": "function processData() print(\"Processing Data\") end processData()"}'

  • Reload Scripts Request:

    Copy
    Copied!
                

    curl -X POST http://localhost:$CLX_RTA_HTTP_PORT/rta/lua/scripts/cmd \       -H "Content-Type: application/json" \       -d '{"scriptCommand": "reloadScripts"}'

  • Show Script Log:

    Copy
    Copied!
                

    curl -X POST http://localhost:1814/rta/lua/scripts/cmd \         -H "Content-Type: application/json" \         -d '{"scriptCommand""log""scriptName""example"}

When running on a BlueField, the DOCA Privileged Executer (DPE) is a daemon that enables specific DOCA services, including DTS, to access BlueField information that would otherwise be inaccessible from a container due to technology limitations or restricted permissions. By granting access to privileged system information, DPE enriches the data collected by DTS, providing additional insights and metrics. However, DTS can still operate independently without DPE, as the daemon is disabled by default.

Note

DPE is available on Debian based operation systems only.

DPE Usage

DPE is controlled by systemd, and can be used as follows:

  • To check DPE status:

    Copy
    Copied!
                

    sudo systemctl status dpe

  • To start DPE:

    Copy
    Copied!
                

    sudo systemctl start dpe

  • To stop DPE:

    Copy
    Copied!
                

    sudo systemctl stop dpe

DPE logs can be found in /var/log/doca/telemetry/dpe.log.

DPE Configuration File

DPE can be configured by the user. This section covers the syntax and implications of its configuration file.

Note

The DPU telemetry collected by DTS does not require for this configuration file to be used.

The DPE configuration file allows users to define the set of commands that DPE should support. This may be done by passing the -f option in the following line of /etc/systemd/system/dpe.service:

Copy
Copied!
            

ExecStart=/opt/mellanox/doca/services/telemetry/dpe/bin/dpeserver -vvv

To use the configuration file:

Copy
Copied!
            

ExecStart=/opt/mellanox/doca/services/telemetry/dpe/bin/dpeserver -vvv -f /path/to/dpe_config.ini

The configuration file supports the following sections:

  • [server] - list of key=value lines for general server configuration. Allowed keys: socket.

  • [commands] - list of bash command lines that are not using custom RegEx

  • [commands_regex] - list of bash command lines that are using custom RegEx

  • [regex_macros] - custom RegEx definitions used in the commands_regex section

Consider the following example configuration file:

Copy
Copied!
            

[server] socket=/tmp/dpe.sock   [commands] hostname cat /etc/os-release   [commands_regex] crictl inspect $HEXA # resolved as "crictl inspect [a-f0-9]+" lspci $BDF # resolved as "lspci ([0-9a-f]{4}\:|)[0-9a-f]{2}\:[0-9a-f]{2}\.[0-9a-f]"   [regex_macros] HEXA=[a-f0-9]+ BDF=([0-9a-f]{4}\:|)[0-9a-f]{2}\:[0-9a-f]{2}\.[0-9a-f]

Note

DPE is shipped with a preconfigured file that matches the commands used by the standalone DTS version included in the same DOCA installation. The file is located in /opt/mellanox/doca/services/telemetry/dpe/etc/dpe_config.ini.

Note

Using a DPE configuration file allows for a fine-grained control over the interface exposed by it to the rest of the DOCA services. However, even when using the pre-supplied configuration file mentioned above, one should remember that it has been configured to match a fixed DTS version. That is, replacing the standalone DTS version with a new one downloaded from NGC means that the used configuration file might not cover additional features added in the new DTS version.


This chapter provides an overview and deployment configuration of DOCA Telemetry Service with Grafana .

Grafana Deployment Prerequisites

  • BlueField DPU running DOCA Telemetry Service.

  • Optional remote server to host Grafana and Prometheus.

  • Prometheus installed on the host machine. Please refer to the Prometheus website for more information.

  • Grafana installed on the host machine. Please refer to Grafana Labs website for more information.

Grafana Deployment Configuration

configuration-diagram-version-1-modificationdate-1739110166183-api-v2.png

DTS Configuration (DPU Side)

Configuring DTS to export the sysfs counter using the Prometheus plugin:

Note

Sysfs is used as an example, other counters are available.

  1. Make sure the sysfs counter is enabled.

    Copy
    Copied!
                

    vim /opt/mellanox/doca/services/telemetry/config/dts_config.ini   enable-provider=sysfs

  2. Enable Prometheus exporter by setting the prometheus address and port.

    Copy
    Copied!
                

    vim /opt/mellanox/doca/services/telemetry/config/dts_config.ini   prometheus=http://0.0.0.0:9100

    Note

    In this example, the Prometheus plugin exports data on localhost port 9100, this is an arbitrary value and can changed.

Note

DTS must be restarted to apply changes.


Prometheus Configuration (Remote Server)

Please download Prometheus for your platform.

Prometheus is configured via command-line flags and a configuration file, prometheus.yml.

  1. Open the prometheus.yml file and configure the DPU as the endpoint target.

    Copy
    Copied!
                

    vim prometheus.yml # metrics_path defaults to '/metrics' # scheme defaults to 'http'.   static_configs: - targets: ["<dpu-ip>:<prometheus-port>"]

    Where:

    • <dpu-ip> is the DPU IP address. Prometheus reaches to this IP to pull data.

    • <prometheus-port> the exporter port that set in DTS configuration.

  2. Run Prometheus server:

    Copy
    Copied!
                

    ./prometheus --config.file="prometheus.yml"

    Tip

    Prometheus services are available as Docker images. Please refer to Using Docker in Prometheus' Installation guide.

Grafana Configuration (Remote Server)

Please download and install Grafana for your platform.

  1. Setup Grafana. Please refer to Install Grafana guide in Grafana documentation.

  2. Log into the Grafana dashboard at http://localhost:3000.

    Note

    Port 3000 is the default port number set by Grafana. This can be changed if needed. The default credentials are admin/admin.

  3. Add Prometheus as data source by navigating to Settings → Data sources → Add data source → Prometheus.

    data_sources-version-1-modificationdate-1739110167760-api-v2.png

  4. Configure the Prometheus data source. Under the HTTP section, set the Prometheus server address.

    url_address-version-1-modificationdate-1739110166537-api-v2.png

    Note

    The Prometheus server's default listen port is 9090. Prometheus and Grafana are both running on the same server, thus the address is localhost.

  5. Save and test.

Exploring Telemetry Data

Go to the Explore page on the left-hand side, and choose a Prometheus provider.

Choose a metric to display and specify a label. The label can be used to filter out data based on the source and HCA devices.

explore-version-1-modificationdate-1739110167507-api-v2.png

Graph display after selecting a metric and specifying a label to filter by:

grapgh-version-1-modificationdate-1739110167220-api-v2.png

On top of the Troubleshooting section in the NVIDIA DOCA Container Deployment Guide, here are additional troubleshooting tips for DTS:

  • For general troubleshooting, refer to the DOCA Troubleshooting.

  • If the pod's state fails to be marked as "Ready", refer to /var/log/syslog.

  • Check if the service is configured to write data to the disk as this may cause the system to run out of disk space.

  • If a PIC bus error occurs, configure the following files inside the container:

    Copy
    Copied!
                

    crictl exec -it <container-id> /bin/bash # Add to /config/clx.env the following line: " export UCX_TLS=tcp "

  • If a wrong hostname is set in the source/source_id label of DTS exports, this may indicate that the container is not running on the host network. In such cases, usually the hostname is based on the container name doca-telemetry. To fix this, update the docker command/YAML file accordingly.

© Copyright 2025, NVIDIA. Last updated on May 5, 2025.