SMART was originally designed for ATA devices and extended to SCSI and PCIe/NVMe later to cover almost the whole range of HDDs/SSDs. Trying to send SMART commands to eMMC, e.g. using smartctl
would throw error: Unable to detect device type. Please specify device type with the -d option.
Unlike SATA or SAS, eMMC communicates over parallel links and has a different command set. One of these commands (CMD8
) dumps the Extended CSD (Card Specific Data) register which holds card's internal information and device capabilities including Life Time Estimation and Pre EOL (End of Life) Estimation. EXT_CSD
register can be read (requires root) using mmc
tool from mmc-utils:
~# mmc extcsd read /dev/block/mmcblk0 | grep -E 'LIFE|EOL'
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x03
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x03
eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01
* 0x03
indicates health status is estimated between 20% and 30% of the device lifespan.
* 0x01
indicates Normal pre-EOL status.
Depending on your MMC driver, the above information is also available through sysfs
interfaces:
~# cat /sys/devices/soc/7824900.sdhci/mmc_host/mmc0/mmc0:0001/{
life_time,pre_eol_info
}
0x03 0x03
01
* Path may differ depending on eMMC vendor.
Another option is to read ECSD register from debugfs
:
~# cat /sys/kernel/debug/mmc0/mmc0:0001/ext_csd
But parsing ECSD raw output is an extra job.
For UFS part I'm not sure at the moment if the health/wear estimation is available through HCI Capabilities Registers or not. Also unlike eMMC, UFS operates over a serial communication link and supports a subset of SCSI commands. So it might be providing SMART (or SMART-like) monitoring system. Someone else may update the answer if some authentic source of information is available.
REFERENCES: