Managing SPDK logs with nvmeof-cli
Get, set, and disable Storage Performance Development Kit (SPDK) log information for NVMe-oF by using the command-line interface (CLI).
Before you begin
nvmeof-cli alias setup. For more information about defining the alias, see step 1 of Defining an NVMe-oF subsystem with nvmeof-cli.About this task
The following parameters are interchangeable:
- --level and -l
- --print and -p
Important: When using the optional --format and --output parameters, they must come before the spdk_log_level set command input. For example,
[root@host01 ~]# nvmeof-cli --server-address 10.172.19.01 --server-port 5500 --format json --output stdio spdk_log_level get
For more information about nvme-of cli command line options, see Using the nvmeof-cli utility for configuring and managing NVMe-oF gateways.
Use the commands listed here to manage your SPDK logs.
Getting the SPDK log level
nvmeof-cli --server-address GATEWAY_IP --server-port SERVER_PORT spdk_log_level get
For example,
[root@host01 ~]# nvmeof-cli --server-address 10.172.19.01 --server-port 5500 spdk_log_level get
Setting the SPDK log level
nvmf) log flags.
The available SPDK nvmf log levels and SPDK nvmf print levels are: DEBUG, INFO, NOTICE, WARNING, and ERROR.
nvmeof-cli --server-address GATEWAY_IP --server-port SERVER_PORT spdk_log_level set --level SPDK_NVMF_LOG_LEVEL --print SPDK_NVMF_LOG_PRINT_LEVEL
The following example sets both the print and log levels to
ERROR.
[root@host01 ~]# nvmeof-cli --server-address 10.172.19.01 --server-port 5500 spdk_log_level set --level ERROR --print ERROR
Disabling SPDK log flags
nvmf) log flags.
nvmeof-cli --server-address GATEWAY_IP --server-port SERVER_PORT spdk_log_level disable
For example,
[root@host01 ~]# nvmeof-cli --server-address 10.172.19.01 --server-port 5500 spdk_log_level disable