Last active
August 29, 2015 14:17
-
-
Save yayugu/5902daaf6807a534d446 to your computer and use it in GitHub Desktop.
雑なHDD監視crontab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 * * * * sudo ruby -e 'zstat = `zpool status -x`.strip; if zstat != "all pools are healthy" then puts zstat; end' | |
35 * * * * sudo ruby -e '["sda", "sdb", "sdc", "sdd"].each do |dev| health = `smartctl -H /dev/#{dev}`; unless health.include?("SMART overall-health self-assessment test result: PASSED") then puts dev; puts health; end; end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment