zhaog / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

Summary: Adaptec ZMM-BBU not recognized #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi there,

the latest Adaptec Controllers use a ZMM (Zero-Maintenance Module) as BBU, this 
isn't tracked in the summary-tool.

I've attached a sample arcconf-output from one of our db-servers, this should 
help :-)

Cheers,
Jan

Original issue reported on code.google.com by jan.m...@googlemail.com on 7 Feb 2011 at 10:14

Attachments:

GoogleCodeExporter commented 8 years ago
Maybe something like this ;)

--- summary 2011-02-06 15:16:11.000000000 +0100
+++ summary.patched 2011-02-09 16:46:26.632329865 +0100
@@ -460,11 +460,17 @@
    status="$(awk -F: '/Controller Status/{print $2}' /tmp/aspersa)"
    name_val Specs "${model/ /},${chan},${cache} cache,${status}"

+   if grep -q "ZMM" /tmp/aspersa; then
+   battery=$(grep -A2 'Controller ZMM Information' /tmp/aspersa \
+      | awk '/Status/        {s=$4}
+   END           {printf("ZMM %s", s)}')
+   else
    battery=$(grep -A5 'Controller Battery Info' /tmp/aspersa \
       | awk '/Capacity remaining/ {c=$4}
              /Status/             {s=$3}
              /Time remaining/     {t=sprintf("%dd%dh%dm", $7, $9, $11)}
              END                  {printf("%d%%, %s remaining, %s", c, t, s)}')
+   fi
    name_val Battery "${battery}"

    # ###########################################################################

Original comment by jan.m...@googlemail.com on 9 Feb 2011 at 3:47