Skip to content

Latest commit

 

History

History
53 lines (30 loc) · 1.37 KB

README.md

File metadata and controls

53 lines (30 loc) · 1.37 KB

SSD-Life-Calc

Introduction

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.

Prerequisites

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

How to Use

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.

Set an alias in .zshrc

example:

alias slc="python3 ~/Projects/ssd-life-calc/calc.py"

Sample Run

Screenshot 2021-07-02 at 23 46 59

Removal

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.