Code: Select all
zemerdon@NAS:~$ cat nvme_tbw.sh
echo "*** $(date -R) ***"
tbw=$(cat /sys/fs/ext4/nvme0n1p2/lifetime_write_kbytes)
TB=1000000000
echo "TB written to Samsung 980 PRO NVMe 1TB:"
calc $tbw / $TB
*** Fri, 05 Jan 2024 11:27:55 +1000 ***
TB written to Samsung 980 PRO NVMe 1TB:
19.507116717