đž Hard Disk Drives
And estimating time of failure (based on arbitrary read/write cycle counts)
sudo smartctl -t long /dev/sdX
Run test (4hr+)
sudo smartctl -H /dev/sdX
Print test result
echo "$(((((( $(sudo smartctl -x /dev/sdX | grep -w "Logical Sectors Written" | awk '{print ($4)}') / 2 )) / 1024 )) / 1024))GB"
echo "$(((((( $(sudo smartctl -x /dev/sdX | grep -w "Logical Sectors Read" | awk '{print ($4)}') / 2 )) / 1024 )) / 1024))GB"
apti iotop
sudo iotop -o
apti glances
glances