Disks: eMMC is one device, not three, and reports wear from its own registers
mmcblkNboot0/boot1/rpmb are hardware areas of the chip; hide them on Disks and Dashboard. Badge eMMC/SD instead of SSD. smartctl cannot talk to MMC, so read life_time and pre_eol_info from /sys instead of showing its error. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
488d929733
commit
232163ff4c
@@ -573,6 +573,10 @@ func (c *Collector) net(dt float64) []Net {
|
||||
var skipDiskPrefix = []string{"loop", "ram", "zram", "nbd", "sr", "fd", "dm-", "md", "drbd", "zd", "pmem"}
|
||||
|
||||
func skipDisk(n string) bool {
|
||||
// eMMC boot/RPMB/general-purpose areas: regions of the chip, not drives
|
||||
if strings.HasPrefix(n, "mmcblk") && (strings.Contains(n, "boot") || strings.HasSuffix(n, "rpmb") || strings.Contains(n, "gp")) {
|
||||
return true
|
||||
}
|
||||
for _, p := range skipDiskPrefix {
|
||||
if strings.HasPrefix(n, p) {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user