NVME-ID-CTRL(1)
π NVME-ID-CTRL(1) β the nvme-id-ctrl glow-up
okay bestie, this is a page from the NVMe Manual, and it's literally about sending an Identify Controller command and getting the result + structure back. slay. let's get into it π
β¨ NAME β¨
nvme-id-ctrl β send NVMe Identify Controller, return result and structure. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
nvme [<global-options>] id ctrl <device>
[--vendor-specific | -V]
[--raw-binary | -b]
π¦ DESCRIPTION π¦
so for the NVMe device you hand it, it sends an identify controller command and gives you back the result and the returned structure. no cap. β¨
the <device> parameter is mandatory, and it can be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1). pick your fighter π
on success, the structure comes back in one of several ways depending on the option flags β either the structure gets parsed by the program, or the raw buffer gets printed to stdout. your call, main character. π
π«Ά heads up, the barenvme id-ctrlform (without a space) still works as a deprecated alias and will be removed in a future major version. new scripts should usenvme id ctrlinstead. it's giving "we're retiring this, respectfully". π
π OPTIONS π
-b,--raw-binaryβ prints the raw buffer to stdout, and the structure is not parsed by the program. this one overrides the vendor specific and human readable options, so it's lowkey the boss of the group. π€-V,--vendor-specificβ in addition to parsing known fields, this dumps the vendor specific region of the structure in hex with ascii interpretation. iconic. β¨
π§ GLOBAL OPTIONS π§
these ones are defined at the top-level nvme command and are available to this subcommand β so they're like, universally invited to the party π
--dry-runβ print the command that would be executed, but don't actually execute it. a vibe check before the real thing π--no-ioctl-probingβ disables probing for 64-bit IOCTL support. simple as that. π¦--no-retriesβ disables retry logic on transient errors. one shot, no second chances, periodt. π-o <fmt>,--output-format=<fmt>β sets the reporting format tonormal,tabular,'json, orbinary. only one output format may be used at a time, so don't get greedy bestie πΈ--output-format-version=<version>β selects the output format version. version1uses the original field naming, while version2(the default!) provides more consistent and script-friendly field names. other versions are rejected β no gatecrashing π--quietβ suppresses informational messages. errors are still reported, and--quietcancels any--verbosefor the library log level. it's giving "shhh, i'm focusing" β¨--set-options=<key=value>[,<key=value>...]β sets libnvme library options for this invocation. supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir. very key-value of you π₯--timeout=<ms>β sets the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). unlimited patience energy π§ββοΈ-v,--verboseβ increases the level of detail in the output. may be specified multiple times to further increase verbosity. stack it like a true icon π
π btw these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. no cap, the flag wins every time. π«Ά
π EXAMPLES π
- has the program interpret the returned buffer and display the known fields in a human readable format:
# nvme id ctrl /dev/nvme0
- in addition to showing the known fields, has the program display the vendor unique field:
# nvme id ctrl /dev/nvme0 --vendor-specific
# nvme id ctrl /dev/nvme0 -V
the above will dump the vs buffer in hex since it doesn't know how to interpret it. honestly relatable, nobody knows what's in there π
- have the program return the raw structure in binary:
# nvme id ctrl /dev/nvme0 --raw-binary > id_ctrl.raw
# nvme id ctrl /dev/nvme0 -b > id_ctrl.raw
it is probably a bad idea to not redirect stdout when using this mode. like, seriously, redirect it. π
- alternatively you may want to send the data to another program that can parse the raw buffer.
# nvme id ctrl /dev/nvme0 --raw-binary | nvme_parse_id_ctrl
the parse program in the above example can be a program that shows the structure in a way you like. the following program is such an example that will parse it and can accept the output through a pipe, '|', as shown in the above example, or you can cat a saved output buffer to it. chef's kiss pipeline behavior π
/* File: nvme_parse_id_ctrl.c */
#include <linux/nvme.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
unsigned char buf[sizeof(struct nvme_id_ctrl)];
struct nvme_id_ctrl *ctrl = (struct nvme_id_ctrl *)buf;
if (read(STDIN_FILENO, buf, sizeof(buf)))
return 1;
printf("vid : %#x\n", ctrl->vid);
printf("ssvid : %#x\n", ctrl->ssvid);
return 0;
}
π NVME π
part of the nvme-user suite β one of us, one of us π«
and that's the whole page bestie!! π«Ά this little masterpiece is from the NVMe manual, dated 10/30/2026, and yeah β it's NVME-ID-CTRL(1), part of the nvme-user suite. go forth and identify some controllers, you absolute legend ππ
β¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms