Neato Script To Check SMART Status On A Mac
Join the DZone community and get the full member experience.Join For Free
Slap in a file, make it executable. Voila. You can put this in your bin, set it up as a cron job, etc. Have to have the command line growlnotify installed for this to work, but you could just mailx yourself or something similar otherwise.
#!/usr/bin/env ruby status = `/usr/sbin/diskutil info disk0 | grep "SMART"`.chomp.split(':').last.lstrip puts status if status !~ /Verified/ `growlnotify -m "SMART status not verified"` end
Opinions expressed by DZone contributors are their own.