NVME-WDC-ENC-GET-LOG(1)

πŸ’… nvme-wdc-enc-get-log β€” the manual page, but make it make sense

okay bestie, welcome to NVME-WDC-ENC-GET(1) β€” yes that's the manual page name, yes it's a mouthful, and yes we're gonna get through it together. this is the page for nvme-wdc-enc-get-log, and it's part of the nvme-user suite (more on that at the end 🫢).


✨ NAME ✨

nvme-wdc-enc-get-log β€” sends the NVMe WDC enc-get-log Vendor Unique Command and hands you back the result. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

nvme [<global-options>] wdc enc-get-log <device> [--log-id=<NUM>, -l <NUM>]
                        [--output-file=<FILE>, -O <FILE>]
                        [--transfer-size=<SIZE>, -s <SIZE>]

like, look at her. so structured. so iconic. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so for the NVMe device you hand over, this thing sends a Vendor Unique WDC enc-get-log command and outputs the Enclosure logs. that's literally the whole job, no cap.

the <device> parameter is mandatory, and it can be either the NVMe character device (ex: /dev/nvme0).

the --log-id=<NUM>, -l <NUM> parameter is also mandatory β€” bestie you cannot skip this one β€” and it may be either 0xd1, 0xd2, 0xd3, 0xd4, 0xe2 and 0xe4.

⚠️ okay real talk for a sec: this will only work on WDC devices that support this feature. results for any other device are undefined. like, undefined undefined. don't come crying to me πŸ™ˆ

on success it returns the enclosure log data, error code otherwise. periodt.


πŸŽ€ OPTIONS πŸŽ€

  • -O <FILE>, --output-file=<FILE> β€” the output file pathname. yes, that's where the good stuff lands πŸ’–
  • -s <SIZE>, --transfer-size=<NUM> β€” the data retrieval transfer size. the maximum transfer size should be 0x2000 (decimal 8192). so like, don't go overboard, she has limits 🌸

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

so these are defined at the top-level nvme command and are available to this subcommand. think of them as the main character energy options β€” they apply everywhere ✨

  • --dry-run β€” prints the command that would be executed, but does not actually execute it. a little preview moment, love that for us πŸ’…
  • --no-ioctl-probing β€” disables probing for 64-bit IOCTL support.
  • --no-retries β€” disables retry logic on transient errors.
  • -o <fmt>, --output-format=<fmt> β€” sets the reporting format to normal, tabular, 'json, or binary. only one output format may be used at a time. pick a lane bestie πŸŽ€
  • --output-format-version=<version> β€” selects the output format version. version 1 uses the original field naming, while version 2 (the default) provides more consistent and script-friendly field names. other versions are rejected β€” no custom versions allowed, she said no πŸ’€
  • --quiet β€” suppresses informational messages. errors are still reported, and --quiet cancels any --verbose for the library log level. shhh 🀫
  • --set-options=<key=value>[,<key=value>...] β€” sets libnvme library options for this invocation. 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). she'll wait forever if you ask nicely 😭
  • -v, --verbose β€” increases the level of detail in the output. may be specified multiple times to further increase verbosity. go off, stack it 🌈

these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. no exceptions, that's the rule πŸ‘‘


⭐ EXAMPLES ⭐

  • gets the enclosure log from the device based on the log id (0xd1) with transfer size (0x2000) and saves to the defined file in the current directory:
# nvme wdc enc-get-log /dev/nvme0 -l 0xd1 -O d1_log.bin -s 0x2000
  • gets the enclosure log from the device based on the log id (0xd2) with the default transfer size (0x1000) and saves to the defined file in the current directory:
# nvme wdc enc-get-log /dev/nvme0 -l 0xd2 -O d1_log.bin

(and yes, the second example really does say d1_log.bin again β€” that's what the page says, so that's what we're keeping. copy it exactly, bestie, i don't make the rules πŸ’œ)


🧚 NVME 🧚

part of the nvme-user suite. iconic, honestly 🫢


πŸ’Œ mwah, that's a wrap! this little love letter to enclosures lives on the manual page NVME-WDC-ENC-GET() and it's brought to you straight from the nvme-user suite. go forth and get those logs, bestie β€” you're gonna slay 🌟
πŸ“¦ where this page comes from