---
name: "nvme_get_log_smart"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_get_log_smart"
---

# nvme\_get\_log\_smart(2)

Retrieve nvme smart log

## NAME

nvme\_get\_log\_smart - Retrieve nvme smart log

## SYNOPSIS

**int nvme\_get\_log\_smart** **(int fd** *,* **\_\_u32 nsid** *,* **bool rae** *,* **struct nvme\_smart\_log \*smart\_log** *);*

## ARGUMENTS

- fd

  File descriptor of nvme device

- nsid

  Optional namespace identifier

- rae

  Retain asynchronous events

- smart\_log

  User address to store the smart log

## DESCRIPTION

This log page provides SMART and general health information. The information provided is over the life of the controller and is retained across power cycles. To request the controller log page, the namespace identifier specified is FFFFFFFFh. The controller may also support requesting the log page on a per namespace basis, as indicated by bit 0 of the LPA field in the Identify Controller data structure.

## RETURN

The nvme command status if a response was received (see *enum nvme\_status\_field*) or -1 with errno set otherwise.
