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
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms