This gem extracts and processes info about HDD health status (S.M.A.R.T.)
- You need to have
smartctl
to be installed - You need to be able to run it with passwordless
sudo
(useNOPASSWD
in sudoers)
require 'smart_status'
require 'pp'
processor = SMARTStatus::Parser.new("/dev/sda1")
while true do
pp processor.process
sleep 1
end
The code is in experimental state yet and should not be used for production. Use at your own risk
Classname for SMARTStatus::Parser
is expected to be changed (suggestions are welcome).
Pull requests are welcome.
- Add possibility to run
smartctl
withoutsudo
(you'll need to tweak user groups and block device permissions in this case instead of editingsudoers
) - Nice format output for
SMARTStatus::Attribute#inspect
andSMARTStatus::Attribute#to_s
Author:: Timur Batyrshin (<erthad@gmail.com>)
License:: Apache 2.0