libnvme(2)

πŸŽ€ NAME πŸŽ€

struct nvme_persistent_event_log β€” the Persistent Event Log, bestie πŸ’–

It's a whole struct, ok, and it's literally the glow-up of "what even happened on this drive". Every field is a receipt. πŸ‘‘


✨ SYNOPSIS ✨

struct nvme_persistent_event_log {
    __u8 lid;
    __u8 rsvd1[3];
    __le32 tnev;
    __le64 tll;
    __u8 rv;
    __u8 rsvd17;
    __le16 lhl;
    __le64 ts;
    __u8 poh[16];
    __le64 pcc;
    __le16 vid;
    __le16 ssvid;
    char sn[20];
    char mn[40];
    char subnqn[NVME_NQN_LENGTH];
    __le16 gen_number;
    __le32 rci;
    __u8 rsvd378[102];
    __u8 seb[32];
};

No cap, that's the whole vibe right there. Types are exactly what they are β€” I did not touch a single one, and neither should you. πŸ™…β€β™€οΈ


πŸ’… Members πŸ’…

okay so let's go field by field, main character energy only:

  • lid β€” Log Identifier. The little name tag that says which log this is. 🏷️
  • rsvd1 β€” Reserved. Not for you, bestie. Do not touch. πŸ™ˆ
  • tnev β€” Total Number of Events. As in, how many things have happened. The drive has lore and this is the episode count. 😭
  • tll β€” Total Log Length. The full length of the log, all of it, no skimping. πŸ“
  • rv β€” Log Revision. Which version of the log we're on, like a firmware era. πŸ¦‹
  • rsvd17 β€” Reserved. Again. Hands off. βœ‹
  • lhl β€” Log Header Length. How long the header itself is. πŸ“
  • ts β€” Timestamp. When it all went down. ⏰
  • poh β€” Power on Hours. Exactly what it sounds like β€” hours this thing has been powered on. It's giving "uptime, but make it a personality trait". πŸ”₯
  • pcc β€” Power Cycle Count. How many times it's been turned off and back on again. Yes, that trick. Again. πŸ’€
  • vid β€” PCI Vendor ID. Who made the thing. πŸ’³
  • ssvid β€” PCI Subsystem Vendor ID. Who made the subsystem, which is not always the same person, iykyk. πŸ‘€
  • sn β€” Serial Number. The birth certificate. Every drive is unique, periodt. πŸŽ€
  • mn β€” Model Number. The name on the label. Hi, nice to meet you. πŸ’–
  • subnqn β€” NVM Subsystem NVMe Qualified Name. Yes the whole name. Yes it's long. It's iconic, don't question it. πŸ‘‘
  • gen_number β€” Generation Number. The counter that goes up every time the log rolls over into a new generation. Slay, evolve. 🌈
  • rci β€” Reporting Context Information. The context info the log is reporting with. ✨
  • rsvd378 β€” Reserved. (Say it with me: don't. touch. it.) 🫢
  • seb β€” Supported Events Bitmap. A whole bitmap of all the event types this thing can even do. A mood board, but for events. πŸ—‚οΈ

real talk though β€” every rsvd field in here is reserved. You don't read meaning into it, you don't write meaning into it, you just let it exist. That's the rules. πŸ’œ

okay bestie, that's the whole struct, every single field, nothing skipped, nothing invented. That was libnvme(2), from the API Manual, dated July 2026 β€” mwah, go read the source if you want more, ily, bye 🫢✨🌸

πŸ“¦ where this page comes from