nvme_get_telemetry_log(2)
โจ nvme_get_telemetry_log โ the libnvme API manual, section 2, bestie โจ
okay so picture this: you're deep in libnvme, it's giving firmware engineer, and you need the telemetry log. that's literally what this function is for. welcome to nvme_get_telemetry_log(2), no cap ๐
๐ธ NAME ๐ธ
nvme_get_telemetry_log โ get the specified telemetry log. yes queen, that's the whole job ๐
๐ฆ SYNOPSIS ๐ฆ
int nvme_get_telemetry_log (int fd , bool create , bool ctrl , bool rae
, size_t max_data_tx , enum nvme_telemetry_da da , struct
nvme_telemetry_log **log , size_t *size );
eight arguments. EIGHT. she's high maintenance but she's worth it ๐
โจ ARGUMENTS โจ
fdโ the file descriptor of your nvme device. your main character ๐ซถcreateโ generate a new host initated telemetry capture. yes, the typo is in the original, we don't judge, we just vibe ๐ญctrlโ get the controller initiated log. the classic ๐raeโ retain asynchronous events. hold onto them bestie, don't let go โจmax_data_txโ set the max data transfer size to be used when retrieving telemetry. basically a speed limit but make it chic ๐daโ log page data area. valid values:enum nvme_telemetry_da. pick wisely, she's picky ๐logโ on success, set to the value of the allocated and retrieved log. two-for-one, we love that ๐sizeโ ptr to the telemetry log size, so it can be returned. she's just here to hand you numbers ๐
๐ DESCRIPTION ๐
the total size allocated can be calculated as:
(nvme_telemetry_log da size + 1) * NVME_LOG_TELEM_BLOCK_SIZE
that's it. that's the math. do it, iykyk ๐งฎโจ
๐ RETURN ๐
you get the nvme command status if a response was received (see enum nvme_status_field), or -1 with errno set otherwise. so either she answers you or she ghosts you with an errno. brutal. iconic. ๐
reminder bestie:-1means checkerrno, always. don't be out here guessing, that's not the vibe ๐
and that's the whole page, we ate, no crumbs left ๐ธ thanks for reading the libnvme API manual, nvme_get_telemetry_log(2), dated July 2026 โ go forth and capture that telemetry, you absolute legend ๐
๐ฆ
๐ฆ 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