libnvme\_get\_ctrl\_attr(9) libnvme API manual libnvme\_get\_ctrl\_attr(9)

# [NAME](#NAME)

libnvme\_get\_ctrl\_attr - Read controller sysfs attribute

# [SYNOPSIS](#SYNOPSIS)

**char * libnvme\_get\_ctrl\_attr** **(struct libnvme\_ctrl \*c ,** **const char \*attr );**

# [ARGUMENTS](#ARGUMENTS)

[c](#c)

Controller instance

[attr](#attr)

sysfs attribute name

# [RETURN](#RETURN)

A newly allocated string with the contents of *attr* (the caller frees), or NULL in case of an empty value or error.

libnvme\_get\_ctrl\_attr October 2026

---

Document: libnvme_get_ctrl_attr-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
