NVME-ADMIN-PASSTHR(1) NVMe Manual NVME-ADMIN-PASSTHR(1) NAME nvme-admin-passthru - Submit an arbitrary admin command, return results SYNOPSIS nvme-admin-passthru [--opcode= | -O ] [--flags= | -f ] [-rsvd= | -R ] [--namespace-id= | -n ] [--cdw2= | -2 ] [--cdw3= | -3 ] [--cdw10= | -4 ] [--cdw11= | -5 ] [--cdw12= | -6 ] [--cdw13= | -7 ] [--cdw14= | -8 ] [--cdw15= | -9 ] [--data-len= | -l ] [--metadata-len= | -m ] [--input-file= | -i ] [--read | -r] [--write | -w] [--timeout= | -t ] [--show-command | -s] [--dry-run | -d] [--raw-binary | -b] [--prefill= | -p ] [--latency | -T] [--output-format= | -o ] [--verbose | -v] DESCRIPTION Submits an arbitrary NVMe admin command and returns the applicable results. This may be the simply the commands result and status, or may also include a buffer if the command returns one. This command does no interpretation of the opcodes or options. The parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1). On success, the returned structure (if applicable) may be returned in one of several ways depending on the option flags; the structure may printed by the program as a hex dump, or may be returned as a raw buffer printed to stdout for another program to parse. OPTIONS -O , --opcode= The NVMe opcode to send to the device in the command -f , --flags= The NVMe command flags to send to the device in the command -R , --rsvd= The value for the reserved field in the command. -n , --namespace-id= The value for the ns-id in the command. -[2-9] , --cdw[2-3,10-15]= Specifies the command dword value for that specified entry in the command -r, --read, -w, --write Used for the data-direction for the command and required for commands sending/receiving data. Don't use both read and write at the same time. -i , --input-file= If the command is a data-out (write) command, use this file to fill the buffer sent to the device. If no file is given, assumed to use STDIN. -l , --data-len= The data length for the buffer used for this command. -m , --metadata-len= The metadata length for the buffer used for this command. -s, --show-cmd Print out the command to be sent. -d, --dry-run Do not actually send the command. If want to use --dry-run option, --show-cmd option must be set. Otherwise --dry-run option will be ignored. -b, --raw-binary Print the raw returned buffer to stdout if the command returns a structure. -p, --prefill Prefill the buffer with a predetermined byte value. Defaults to 0. This may be useful if the data you are writing is shorter than the required buffer, and you need to pad it with a known value. It may also be useful if you need to confirm if a device is overwriting a buffer for a data-in command. -T, --latency Print out the latency the IOCTL took (in us). -o , --output-format= Set the reporting format to normal, json or binary. Only one output format can be used at a time. -v, --verbose Increase the information detail in the output. EXAMPLES o The following will run the admin command with opcode=6 and cdw10=1, which corresponds to an identify controller command. This example requires the data-len param be 4096, which is the size of the returned structure. The -r option is used because it is a data-in command # nvme admin-passthru /dev/nvme0 --opcode=06 --data-len=4096 --cdw10=1 -r o Or if you want to save that structure to a file: # nvme admin-passthru /dev/nvme0 --opcode=06 --data-len=4096 --cdw10=1 -r -b > id_ns.raw NVME Part of the nvme-user suite NVMe 02/16/2024 NVME-ADMIN-PASSTHR(1)