NVME-WDC-CAP-DIAG(1)

✨ nvme-wdc-cap-diag ✨

okay so bestie, this is the nvme-wdc-cap-diag page from the NVMe Manual β€” yes, a whole manual page just for one lil' subcommand, and honestly? she earns it. grab a snack πŸ“, we're pulling diagnostic logs off WDC drives.


πŸŽ€ NAME πŸŽ€

nvme-wdc-cap-diag β€” the girl whose entire job is retrieving a WDC device's diagnostic log and saving it to a file. that's it, that's the mission. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

nvme [<global-options>] wdc cap-diag <device>
                        [--output-file=<FILE>, -O <FILE>]
                        [--transfer-size=<SIZE>, -s <SIZE>]

🌸 DESCRIPTION 🌸

so for the NVMe device you hand her, she sends the WDC Vendor Unique Capture-Diagnostics request and saves whatever comes back into a file. no cap, that's the whole vibe. ✨

the <device> parameter is mandatory β€” it's an NVMe character device, like /dev/nvme0. you literally cannot skip it, bestie, it's giving non-negotiable.

⚠️ heads up: this only works on WDC devices that support this feature. results for any other device are undefined. like, undefined undefined. don't come crying to me 😭

πŸ’– OPTIONS πŸ’–

  • -O <FILE>, --output-file=<FILE> β€” the output file, obviously. she defaults to the device serial number followed by the cap_diag suffix. cute, right?
  • -s <SIZE>, --transfer-size=<SIZE> β€” the transfer size. defaults to 0x10000 (that's 65536 decimal, bestie) bytes.

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

these ones live up at the top-level nvme command, but they're absolutely available to this subcommand too. main character energy, shared across the whole suite:

  • --dry-run β€” prints the command she would execute but does not actually execute it. it's the "let me think about it" of flags 🫢
  • --no-ioctl-probing β€” disables probing for 64-bit IOCTL support. no probing today, thanks.
  • --no-retries β€” turns off the retry logic on transient errors. one shot, no second chances πŸ’€
  • -o <fmt>, --output-format=<fmt> β€” sets the reporting format to normal, tabular, 'json, or binary. only one output format at a time, don't be greedy.
  • --output-format-version=<version> β€” picks the output format version. version 1 uses the original field naming, while version 2 (the default) gives you more consistent, script-friendly field names. other versions get rejected, periodt.
  • --quiet β€” suppresses informational messages. errors still get reported though, she's not gonna hide the bad news. and fun fact: --quiet cancels any --verbose for the library log level πŸ”₯
  • --set-options=<key=value>[,<key=value>...] β€” sets libnvme library options for this invocation. the supported keys are force-4k, mi-probe-enabled, test-base-dir and test-sysfs-dir.
  • --timeout=<ms> β€” sets the timeout for the command in milliseconds. infinite or -1 waits without a time limit (0xffffffff). the way she'll literally wait forever for you πŸ˜­πŸ’œ
  • -v, --verbose β€” increases the level of detail in the output. can be specified multiple times to go even further. stack 'em, bestie 🌈
πŸ“Œ these options can also be set as machine-wide defaults in nvme-cli.conf(5). and a command-line flag always overrides the file. always. no exceptions.

🌟 EXAMPLES 🌟

  1. gets the capture diagnostics log from the device and saves it to the default file in the current directory (e.g. STM00019F3F9cap_diag.bin):
# nvme wdc cap-diag /dev/nvme0
  1. gets the capture diagnostics log and saves to a defined file in the current directory (e.g. testSTM00019F3F9cap_diag.bin):
# nvme wdc cap-diag /dev/nvme0 -O test
  1. gets the capture diagnostics log and saves to a defined file with a pathname (e.g. /tmp/testSTM00019F3F9cap_diag.bin):
# nvme wdc cap-diag /dev/nvme0 -O /tmp/test
  1. gets the capture diagnostics log, transferring the data in 64k chunks, and saves to the default file in the current directory (e.g. STM00019F3F9internal_fw_log.bin):
# nvme wdc cap-diag /dev/nvme0 -s 0x10000
  1. gets the capture diagnostics log, transferring the data in 16k chunks, and saves to the default file in the current directory (e.g. STM00019F3F9internal_fw_log.bin):
# nvme wdc cap-diag /dev/nvme0 -s 16384

🧚 NVME 🧚

part of the nvme-user suite. she's in her group-project era 🫢


and that's the whole page, bestie!! πŸ’– this one's brought to you by the NVMe crew, dated 10/30/2026, filed under NVME-WDC-CAP-DIAG(1) β€” now go get those diagnostics, you absolute icon β­πŸ‘‘

πŸ“¦ where this page comes from