> My oldest NVME dedicated for OE builds, bought 2019-11-24
> https://www.gigabyte.com/SSD/AORUS-NVMe-Gen4-SSD-2TB#kf
> with 3600TBW, shows 60% Estimated Remaining Life after around 21K running
hours and started disconnecting under heavy load (not necessary issue
caused by wear) about a year ago and recently became completely unusable
for builds.
>
> 2nd one I bought when the issues started on 2022-05-16 has 8400 hours and
> Data Units Read: 87,481,897 [44.7 TB]
> Data Units Written: 210,637,555 [107 TB]
>
For partitions with ext4 filesystems on SSD, I use this so I can see the
TBW cycles of my SSD, on login. It is assuming PART is the most heavily
used work partition. (Of course SMART is the better approach, but not
always available or not always correct.)
I just realized this may need /bin/bash rather than /bin/sh...
$ cat /etc/update-motd.d/01-ssd-health
#!/bin/sh
for PART in nvme0n1p4; do
# size of partition in kiB
SIZE=`df -BKB /dev/$PART | grep -e "^/dev/$PART" | awk '{print $2}' | sed
-e 's/[^0-9]//g'`
# size of partition in kiB
USED=`df -BKB /dev/$PART | grep -e "^/dev/$PART" | awk '{print $3}' | sed
-e 's/[^0-9]//g'`
WRITTEN=`cat /sys/fs/ext4/$PART/lifetime_write_kbytes`
echo "SSD $PART is $(($(($WRITTEN + $SIZE - 1)) / $SIZE)) times written
round. TBW 1200."
done
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60950): https://lists.yoctoproject.org/g/yocto/message/60950
Mute This Topic: https://lists.yoctoproject.org/mt/101231469/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-