Skip to content

Instantly share code, notes, and snippets.

@mitchty
Created April 24, 2018 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchty/edb4b4bab311240a79e7a849c20e8fbe to your computer and use it in GitHub Desktop.
Save mitchty/edb4b4bab311240a79e7a849c20e8fbe to your computer and use it in GitHub Desktop.
nexus# for x in $(echo /dev/da?)
printf "%s " ${x} && smartctl -a ${x} | grep Power_On_Hours | perl -lane 'printf "%.2f years = %d hours\n", $F[9]/24/365, $F[9];'
/dev/da0 2.42 years = 21225 hours
/dev/da1 4.64 years = 40676 hours
/dev/da2 3.69 years = 32334 hours
/dev/da3 5.27 years = 46177 hours
/dev/da4 5.28 years = 46263 hours
/dev/da5 2.28 years = 19964 hours
/dev/da6 4.65 years = 40745 hours
/dev/da7 0.10 years = 881 hours
/dev/da8 0.29 years = 2562 hours
/dev/da9 5.56 years = 48716 hours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment