Skip to content

Instantly share code, notes, and snippets.

@mastier
Created March 21, 2017 11:33
Show Gist options
  • Save mastier/2b5d7918810be0ac2a668c068a4dd579 to your computer and use it in GitHub Desktop.
Save mastier/2b5d7918810be0ac2a668c068a4dd579 to your computer and use it in GitHub Desktop.
# thanks http://www.jdgleaver.co.uk/blog/2014/05/23/samsung_ssds_reading_total_bytes_written_under_linux.html
echo "GB Written: $(echo "scale=3; $(sudo /usr/sbin/smartctl -A /dev/sda | grep "Total_LBAs_Written" | awk '{print $10}') * 512 / 1073741824" | bc | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment