Ad Widget

Collapse

Read 3Ware controller disk SMART data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fast.ryder
    Member
    • Apr 2008
    • 46

    #1

    Read 3Ware controller disk SMART data

    Hello!

    I recently helped out a fellow Zabbix user in the #zabbix IRC channel with this script and decided to post it here.

    This script needs two parameters : $1 - 3Ware controller port and $2 - SMART attribute to read.

    It is very very simple, please feel free to improve, add argument check count, etc (dont really have much time for that... lol).

    Note:


    If your disk on a port has a problem or is not connected, smartctl may hang so don't poll unused ports.

    smartctl --attributes -d 3ware,"$1" /dev/twa0 | grep "$2" | cut -c 5- | tr -s [:space:] | cut -d ' ' -f 9

    Cheers,

    Ivo Pereira
    IT Consultant
    Portugal
Working...