DOCA SDK Documentation

DPL Admin

Introduction

DPL Admin is a CLI tool used for managing and inspecting the DPL Runtime daemon. It provides the following functionalities:

  • Viewing the current configuration of the DPL Runtime daemon

  • Reading the DPL Runtime Service logs

  • Setting the log level for the DPL Runtime Service

  • Retrieving the hardware steering dump, capabilities, and NVConfig of the DPL Runtime Service

Options and Commands

Usage:

./dpl_admin.sh -a <host:port> [options] <command> [command-options]

Options:

  • -h--help – Displays help message and exits

  • -v, --version – Displays dpl_admin's version and exits

  • -t,--timeout – Sets clients connection timeout [seconds] 

  • -a, --address –  Required; specifies dpl_admin's server address (refer to agent config file) and port of the template ipv4/6:[address]:[port]. Examples:

    • 192.168.0.1:9600

    • ipv6:[2607:f8b0:400e:c00::ef]:443

    • ipv6:[::]:1234 

  • --cacert - CA certificate path for secure connections

  • --cert - Client's certificate path for mutual authentication

  • --private_key - Client's provate key path for mutual authentication

Credentials (cacert, cert, and private_key) should either all be supplied (for secure connection) or all be missing.


config

Displays the DPL Runtime Service configuration information, including servers, logging, devices and HAL configurations.

  • Usage:

    ./dpl_admin.sh -a <host:port> config

  • Options:

    • -h, - help – Displays command's help message and exit

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 config
    
  • Output:

    ╔═══════════════╦═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
    ║ CONFIGURATION ║                                                                                                                                             ║
    ╠═══════════════╬═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
    ║    servers    ║                                               	         server_address  tcp_port                                                         ║
    ║               ║                                    				dpl_rt        [::]         9559                                                           ║
    ║               ║                                  				  dpl_nspect      [::]         9560                                                           ║
    ║               ║                                    				admin         [::]         9600                                                           ║
    ╠═══════════════╬═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
    ║      log      ║                                                name:   /var/log/doca/dpl_rtd/agent.log                                                      ║
    ║               ║                                                level:                   INFO                                                                ║
    ╠═══════════════╬═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
    ║    devices    ║ ┌──────┬──────────────────────────────┬─────────────────────────────────────┬──────────────────┬──────────────────────────────────────────┐ ║
    ║               ║ │  id  │ counter cache timeout [msec] │ idle timeout polling interval [sec] │  controller attr │                interfaces                │ ║
    ║               ║ ├──────┼──────────────────────────────┼─────────────────────────────────────┼──────────────────┼──────────────────────────────────────────┤ ║
    ║               ║ │ 1000 │              0               │                  2                  │  port_id:  9876  │  name  port_id  mtu          mac         │ ║
    ║               ║ │      │                              │                                     │                  │  eth7     4     1514  00:00:00:00:00:00  │ ║
    ║               ║ │      │                              │                                     │                  │  eth6     3     1514  00:00:00:00:00:00  │ ║
    ║               ║ │      │                              │                                     │                  │  eth5     2     1514  00:00:00:00:00:00  │ ║
    ║               ║ │      │                              │                                     │                  │  eth4     1     1514  00:00:00:00:00:00  │ ║
    ║               ║ │      │                              │                                     │                  │  eth2     0     1514  00:00:00:00:00:00  │ ║
    ║               ║ └──────┴──────────────────────────────┴─────────────────────────────────────┴──────────────────┴──────────────────────────────────────────┘ ║
    ╠═══════════════╬═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
    ║      hal      ║                                                          number of queues:   1                                                              ║
    ║               ║                                                             queue size:     1024                                                            ║
    ║               ║                                                             burst size:      32                                                             ║
    ╚═══════════════╩═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
    
    

set-counter-cache-timeout

Sets counter cache timeout for device.

  • Usage:

    ./dpl_admin.sh -a <host:port> set-counter-cache-timeout --device_id/-d <DEVICE_ID> --timeout_value/-t <TIMEOUT_VALUE>

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --device_id, -d – Required; specifies device ID.

    • --timeout_value, -t – Required; specifies new counter cache time-out value.

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 set-counter-cache-timeout --device_id 1000 --timeout_value 3
    
  • Output:

    Device ID: 1000, new timeout: 3 msec
    

set-log-level

Sets DPL Runtime Service's log level.

  • Usage:

    dpl_admin.sh -a <host:port> set-log-level --level <LOG_LEVEL>

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --level, -l – Required; new log level out of {DISABLE, CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE}

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 set-log-level --level DEBUG

  • Output:

    dpl_rtd log level set to: 'DEBUG'

Setting log level is not persistent. DPL Admin restarts with log level according to config file.

get-log-full

Reads DPL Runtime Service's log into a file.

  • Usage:

    ./dpl_admin.sh -a <host:port> get-log-full

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --outpath, -o – Optional; specifies output log file path. Defaults to current directory.

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 get-log-full --outpath '/tmp/dpl_agent.log'

  • Output:

    Find Log file at: '/tmp/dpl_agent.log'

get-log-recent

Displays recent DPL Runtime Service's log lines.

  • Usage:

    ./dpl_admin.sh -a <host:port> get-log-recent

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --number_of_lines, -n – Optional; specifies number of recent log lines to read. Defaults to 10.

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 get-log-recent --number_of_lines 6

  • Output:

    [12:45:09:480451][73079][DOCA][INF][OnReadDone] New client connected to device 1000
    [12:45:09:481295][73078][DOCA][INF] A program was previously loaded, clearing it before applying new one...
    [12:45:09:481314][73078][DOCA][INF] [DPL Device 1000] Removing DPL program ...
    [12:45:09:498476][73078][DOCA][INF] [DPL Device 1000] DPL program was removed.
    [12:45:09:499432][73078][DOCA][INF] [DPL Device 1000] Loading DPL program ...
    [12:45:09:522419][73078][DOCA][INF] [DPL Device 1000] DPL program was loaded successfully.

hws-dump

Dumps DPL Runtime Service's hardware steering rules into a file.

  • Usage:

    ./dpl_admin.sh -a<host:port> hws-dump --device_id/-d <DEVICE_ID> 

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --device_id, -d – Required; specifies device ID.

    • --parser_args, -a – Optional; specifies arguments to pass to HWS dump tool.

    • --outpath, -o – Optional; specifies output file path. Defaults to current directory.

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 hws-dump --device_id 1000 --parser_args '-vvv' --outpath '/tmp/dpl_hws_dump.txt' 

  • Output:

    Find HWS dump file at: '/tmp/dpl_hws_dump.txt'

Intended as a debugging aid for developers.

hca-capabilities

Dumps NIC HCA capabilities into a file.

  • Usage:

    ./dpl_admin.sh -a <host:port> hca-capabilities --device_id/-d <DEVICE_ID>

  • Options:

    • -h, - help – Displays command's help message and exit.

    • --device_id, -d  – Required; specifies device ID.

    • --outpath, -o – Optional; specifies output file path. Defaults to current directory.

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 hca-capabilities --device_id 1000 --outpath '/tmp/dpl_hca_capabilities.json' 

  • Output:

    Find HCA capabilities file at: '/tmp/dpl_hca_capabilities.json'

nv-config

Dumps DPL Runtime Service's NV config into a file.

  • Usage:

    ./dpl_admin.sh -a <host:port> nv-config --device_id/-d <DEVICE_ID>

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --device_id, -d – Required; specifies device ID.

    • --outpath, -o – Optional; specifies output file path. Defaults to current directory. 

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 nv-config --device_id 1000 --outpath '/tmp/dpl_nv_config.txt' 

  • Output:

    Find NV config file at: '/tmp/dpl_nv_config.txt'

set-idle-timeout-polling-interval

Sets idle timeout polling interval [in seconds]

  • Usage:

    ./dpl_admin.sh -a <host:port> set-idle-timeout-polling-interval --device_id/-d <DEVICE_ID> --interval/-i <NEW_INTERVAL>

  • Options:

    • -h, - help  – Displays command's help message and exit.

    • --device_id, -d – Required; specifies device ID.

    • --interval, -i – Required; New polling interval to be set [seconds].

  • Example:

    ./dpl_admin.sh -a 10.1.1.1:9600 set-idle-timeout-polling-interval --device_id 1000 --interval 3 

  • Output:

    Device ID: 1000, new polling interval: 3 seconds                                    

Last updated: