libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’œ libnvme(9) β€” okay bestie, let's talk about struct nvme_voltage_measurement_log

So this is a page from the libnvme API Manual β€” yes, the libnvme manual, section 9 β€” and today's main character is a lil struct that maps out the Voltage Measurement Log Page, aka Log Identifier 27h. It's giving "I measure volts and I take that seriously" ✨


🌸 NAME 🌸

struct nvme_voltage_measurement_log β€” the Voltage Measurement Log Page, and yes bestie, that's Log Identifier 27h πŸŽ€


✨ SYNOPSIS ✨

No cap, here's the whole shape of it, verbatim, don't touch a single character:

struct nvme_voltage_measurement_log {
    __u8 vmgn;
    __u8 vma;
    __le16 vsi;
    __le32 vmlsz;
    __le16 nvmds;
    __le16 nvmde;
    __le16 svmtr;
    struct nvme_timestamp   svmts;
    __le16 cntlid;
    __le16 vlvss;
    __u8 rsvd26[6];
    __le16 ovol;
    __le16 ovc;
    __le16 ovlt;
    struct nvme_timestamp   ovts;
    __u8 iovpe;
    __le16 uvol;
    __le16 uvc;
    __le16 uvlt;
    struct nvme_timestamp   uvts;
    __u8 iuvpe;
    __u8 rsvd62[2];
    __le16 ivmd[];
};

πŸ¦‹ Members πŸ¦‹

Okay so this is the part where we go field by field, and honestly? Every one of them is iconic in its own way:

  • vmgn β€” Voltage Measurement Generation Number πŸ’« it gets incremented every single time a Set Features command starts Voltage Measurements. Like a little counter that only goes up.
  • vma β€” Voltage Measurement Attributes, peek at enum nvme_voltage_measurement_vma for the deets.
  • vsi β€” Voltage Sensor Info, see enum nvme_voltage_measurement_vsi. Ngl though, this one is meaningless if the VMC bit is cleared to '0' in vma β€” so check your bits before you get attached 😭
  • vmlsz β€” Voltage Measurement Log Size: how big this log page is, in bytes.
  • nvmds β€” Number of Voltage Measurement Descriptors Supported: literally the max number of entries the Interval Voltage Measurement Descriptor list can hold.
  • nvmde β€” Number of Voltage Measurement Descriptors Entries: how many entries are actually chillin' in ivmd right now.
  • svmtr β€” Stop Voltage Measurement Time Remaining, in minutes, rounded up (generous queen behavior 🫢).
  • svmts β€” Stop Voltage Measurement Timestamp: the exact time interval voltage measurements stopped being collected. See struct nvme_timestamp for the format.
  • cntlid β€” Controller Identifier, the one associated with vsi, svmts, ovts, and uvts. One controller to bind them all πŸ’…
  • vlvss β€” Voltage Log Vendor Specific Size: size in bytes of the Vendor Specific field that comes right after ivmd.
  • rsvd26 β€” Reserved. Not for you. Move along πŸ™ˆ
  • ovol β€” Overvoltage, see enum nvme_voltage_measurement_ovol.
  • ovc β€” Overvoltage Count.
  • ovlt β€” Overvoltage Log Threshold, measured in units of the Voltage Sensor Sample Scale.
  • ovts β€” Overvoltage Timestamp. See struct nvme_timestamp. ⏰
  • iovpe β€” Interval Overvoltage Percent Error, ranges from 0 to 100. And if it's 255? That means a value is not reported β€” it's giving "no data, no opinion" πŸ’€
  • uvol β€” Undervoltage, see enum nvme_voltage_measurement_uvol.
  • uvc β€” Undervoltage Count.
  • uvlt β€” Undervoltage Log Threshold, also in units of the Voltage Sensor Sample Scale.
  • uvts β€” Undervoltage Timestamp. See struct nvme_timestamp. ⏰
  • iuvpe β€” Interval Undervoltage Percent Error, 0 to 100 again. And again, 255 means a value is not reported.
  • rsvd62 β€” Reserved. Same vibe as the other one: hands off 😌
  • ivmd β€” Interval Voltage Measurement Descriptor list, see enum nvme_voltage_measurement_ivmd. And plot twist: it's followed by a Vendor Specific field that's vlvss bytes long β€” if vlvss is non-zero. Conditional queen πŸ‘‘

Lowkey important reminder bestie: this is a flexible array member situation at the end (ivmd[]), so the vendor-specific stuff just trails along after it. Don't go reading past what vmlsz tells you, okay? 🫢

🌈 that's the whole page! 🌈

Written for the libnvme API Manual, this very page dropped in October 2026, star of the show struct nvme_voltage_measurement_log, living in section libnvme(9). Slay, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from