nvme_get_host_telemetry(2)
๐ nvme_get_host_telemetry(2) ๐
okay so bestie, welcome to the libnvme API manual โจ we're talking about nvme_get_host_telemetry today and honestly? it's giving very demure, very mindful, very "i just want the host telemetry log" ๐
โจ NAME โจ
nvme_get_host_telemetry โ get host telemetry log ๐ฆ like, it goes and fetches the telemetry log for you. that's the whole vibe. no cap.
โจ SYNOPSIS โจ
int nvme_get_host_telemetry (int fd , struct nvme_telemetry_log **log ,
enum nvme_telemetry_da da , size_t *size );
periodt. that's the whole signature, look at her ๐
โจ ARGUMENTS โจ
fdโ the file descriptor of the nvme device. you know, the little number that's your backstage pass to the drive ๐๏ธlogโ on success, this gets set to the value of the allocated and retrieved log. so like, if everything slays, your pointer here is gonna be holding the goods ๐daโ the log page data area. valid values live inenum nvme_telemetry_daโ don't freestyle this one, use the enum bestie ๐sizeโ a pointer to the telemetry log size, so it can be returned to you. she's an out-param, she's doing the most, respect her ๐ธ
โจ DESCRIPTION โจ
so here's the math and yes we're doing math in a manpage, stay with me ๐งฎโจ 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 formula. the da size plus one, times NVME_LOG_TELEM_BLOCK_SIZE. iconic behavior tbh ๐ฅ
โจ RETURN โจ
you're gonna get back the nvme command status if a response was received โ peep enum nvme_status_field for the deets ๐ โ or -1 with errno set otherwise. so if you see that -1, check your errno, she's trying to tell you something ๐ญ
tiny reminder bestie:errnodoes NOT set itself for fun. if you got-1, go read it. iykyk ๐
and that's the whole page, we ate and left no crumbs ๐ the source is libnvme API manual, dated July 2026, and this was nvme_get_host_telemetry section 2 โ mwah, take care of your nvme devices and your pointers, ily ๐ซถ๐โจ
๐ฆ 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