Simple calculator for check the usable time period of the SSD on your M1 Mac. The results will be further accurate with a Longer time period ( minimum is 1 day, a month is preferred )
This script calculates based on the available free space on your SSD and assuming these SSDs have a 150TBW per 250GB.
install Smartmontools via Homebrew using,
brew install smartmontools
run Following command. it will create a file named "firstssdlc.json" in your home directory. You only need to run this command at the first time.
smartctl -a disk0 -j > ~/firstssdlc.json
Locate the terminal to your Home directory and run the calc.py
python script.
python3 ~/PATH/TO/THE/FILE/calc.py
or,
just place the calc.py in the Home directory.
example:
alias slc="python3 ~/Projects/ssd-life-calc/calc.py"
This script will create 3 files in your home directory. (firstssdlc.json, newssdlc.json and currentfreespace.txt) you can delete them if you're no longer using the script.