User Tools

Site Tools


pages:scripts:bbustatus

bbustatus

#!/bin/bash
# set -x;

# 3Ware CLI BBU Report
#
# https://martinlanner.com/2013/08/24/3ware-raid-status-script/
#
# You will need to install the tw_cli utility which you can
# download for free from www.3ware.com or you can get it from
# 3rd party repositories.

##########################################################
#  Do NOT edit below unless you know what you're doing.  #
##########################################################

# Get info on BBU status
STATUS_BBU=$(tw_cli /c0/bbu show | awk 'FNR == 4 {print $4}');
MESSAGE=$(tw_cli /c0/bbu show);
echo "${MESSAGE}";

# Check the status and set return-code
if [ "$STATUS_BBU" != "OK" ] ;
then
        # BBU must be not OK - ERROR!
        exit 1;
fi
exit 0;

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
pages/scripts/bbustatus.txt · Last modified: 2022/12/31 00:05 by Heiko Mischer