DPL Admin
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
Usage:
dpl_admin.sh help
usage: ./dpl_admin.sh [help] [-i <docker image>] [-a <host:port>] [--mount <path>]... <dpl_admin command> [args...]
Options:
Flag / Option | Description |
| Show help message and exit |
| Display the program’s version number and exit |
| Increase output verbosity (default: |
| Set the |
| Set gRPC channel connectivity timeout in seconds (default: |
Authentication options (mutually inclusive for secure connection):
Flag / Option | Description |
| Path to CA certificate for secure connections |
| Path to client certificate for mutual authentication |
| Path to client private key for mutual authentication |
Available commands:
Use dpl_admin <command> -h
for more details on each.
Command | Description |
| Retrieve device configurations |
| Set counter cache timeout for the device |
| Configure the logging level |
| Fetch the full device log |
| Retrieve recent log entries |
| Dump hardware steering data |
| Show HCA capabilities |
| Access non-volatile configuration settings |
| Set the idle timeout polling interval |
The -a
flag is only required if the address and port are not configured in scripts_config.sh
, as documented under section "Configuring Launch Scripts". The examples below assume scripts_config.sh
has already been configured.
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 config
Output:
╔═══════════════╦══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗ ║ CONFIGURATION ║ ║ ╠═══════════════╬══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣ ║ servers ║ ╔════════════╦════════════════╦══════════╗ ║ ║ ║ ║ ║ server_address ║ tcp_port ║ ║ ║ ║ ╠════════════╬════════════════╬══════════╣ ║ ║ ║ ║ p4_rt ║ [::] ║ 9559 ║ ║ ║ ║ ║ dpl_nspect ║ [::] ║ 9560 ║ ║ ║ ║ ║ admin ║ [::] ║ 9600 ║ ║ ║ ║ ╚════════════╩════════════════╩══════════╝ ║ ║ log ║ ╔════════╦══════════════════════════════════════════╗ ║ ║ ║ ║ attr ║ value ║ ║ ║ ║ ╠════════╬══════════════════════════════════════════╣ ║ ║ ║ ║ name: ║ /var/log/doca/dpl_rt_service/dpl_rtd.log ║ ║ ║ ║ ║ level: ║ INFO ║ ║ ║ ║ ╚════════╩══════════════════════════════════════════╝ ║ ║ devices ║ ┌──────┬──────────────────────────────┬─────────────────────────────────────┬──────────────────────┬───────────────────────────────────────────────┐ ║ ║ ║ │ id │ counter cache timeout [msec] │ idle timeout polling interval [sec] │ controller attr │ interfaces │ ║ ║ ║ ├──────┼──────────────────────────────┼─────────────────────────────────────┼──────────────────────┼───────────────────────────────────────────────┤ ║ ║ ║ │ 1000 │ 0 │ 2 │ ╔══════════╦═══════╗ │ ╔══════╦═════════╦══════╦═══════════════════╗ │ ║ ║ ║ │ │ │ │ ║ attr ║ value ║ │ ║ name ║ port_id ║ mtu ║ mac ║ │ ║ ║ ║ │ │ │ │ ╠══════════╬═══════╣ │ ╠══════╬═════════╬══════╬═══════════════════╣ │ ║ ║ ║ │ │ │ │ ║ port_id: ║ 9876 ║ │ ║ eth2 ║ 0 ║ 1514 ║ 00:00:00:00:00:00 ║ │ ║ ║ ║ │ │ │ │ ╚══════════╩═══════╝ │ ║ eth4 ║ 1 ║ 1514 ║ 00:00:00:00:00:00 ║ │ ║ ║ ║ │ │ │ │ │ ║ eth5 ║ 2 ║ 1514 ║ 00:00:00:00:00:00 ║ │ ║ ║ ║ │ │ │ │ │ ║ eth6 ║ 3 ║ 1514 ║ 00:00:00:00:00:00 ║ │ ║ ║ ║ │ │ │ │ │ ║ eth7 ║ 4 ║ 1514 ║ 00:00:00:00:00:00 ║ │ ║ ║ ║ │ │ │ │ │ ╚══════╩═════════╩══════╩═══════════════════╝ │ ║ ║ ║ └──────┴──────────────────────────────┴─────────────────────────────────────┴──────────────────────┴───────────────────────────────────────────────┘ ║ ║ hal ║ ╔═══════════════════╦═══════╗ ║ ║ ║ ║ attr ║ value ║ ║ ║ ║ ╠═══════════════════╬═══════╣ ║ ║ ║ ║ 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 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 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 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 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 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.
Passing multiple options for the --parser_args
flag requires wrapping them with back-slash escaped quotation marks or apostrophe. For example:
./dpl_admin.sh hws-dump --device_id 1000
--parser_args \'-vvv --extra_hw_res all\' --outpath '
/tmp/dpl_hws_dump.txt'
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 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 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 set-idle-timeout-polling-interval --device_id 1000 --interval 3
Output:
Device ID: 1000, new polling interval: 3 seconds