/m1_ssd_tbw

Measure SSD wear (Total Bytes Written) on MacOS M1 (ARM64) machines

Primary LanguageShellMIT LicenseMIT

bash_unit CI Shellcheck CI GH Language GH stars GH tag GH License basher install

m1_ssd_tbw

Measure SSD wear (TBW) on MacOS M1 (ARM64) machines

Background

🔥 Usage

Program: m1_ssd_tbw 1.0.0 by peter@forret.com
Updated: Feb 22 22:00:20 2021
Description: Measure SSD wear (TBW) on MacOS M1 (ARM64) machines
Usage: m1_ssd_tbw [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-d <disk>] <action>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] output more [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for log files   [default: /Users/pforret/log/m1_ssd_tbw]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: .tmp]
    -d|--disk <?>    : [option] disk ID  [default: /dev/disk0]
    <action>         : [parameter] action to perform: info/check

Running it (needs sudo password because of smartctl:

> ./m1_ssd_tbw info   
Password:
SSD disk size: 494 GB
SSD disk used: 146 GB
SSD bytes written: 50 TB
SSD current index: 101 x
SSD max index: 5800 x
SSD wear = 1.74 %

🚀 Installation

with basher

$ basher install pforret/m1_ssd_tbw

or with git

$ git clone https://github.com/pforret/m1_ssd_tbw.git
$ cd m1_ssd_tbw

📝 Acknowledgements

© 2021 Peter Forret