Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2008 09:38:09 +0200 (CEST)
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ruben@verweg.com
Subject:   ports/123697: [PATCH] sysutils/linux-megacli: Fix periodic script after update
Message-ID:  <200805150738.m4F7c9bw048048@coyote.spoerlein.net>
Resent-Message-ID: <200805150740.m4F7e1jn043184@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         123697
>Category:       ports
>Synopsis:       [PATCH] sysutils/linux-megacli: Fix periodic script after update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 15 07:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 6.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD coyote.spoerlein.net 6.3-STABLE FreeBSD 6.3-STABLE #0: Mon May  5 21:50:11 CEST
>Description:
- The output of some fields changed, leading to the awk magic not getting the pyshical disks
- Take some other random field for the battery ok status
- Print units with battery output (makes it more clear what the columns mean, IMHO)

Port maintainer (ruben@verweg.com) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:

Here's some sample output:


# megacli -PDList -a0
                                     
Adapter #0

Enclosure Device ID: 10
Slot Number: 0
Device Id: 8
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
Raw Size: 70007MB [0x88bb998 Sectors]
Non Coerced Size: 69495MB [0x87bb998 Sectors]
Coerced Size: 68664MB [0x861c000 Sectors]
Firmware state: Online
SAS Address(0): 0x5000c50005819979
SAS Address(1): 0x0
Connected Port Number: 0 
Inquiry Data: SEAGATE ST373455SS      00023LQ16EM5

Enclosure Device ID: 10
Slot Number: 1
Device Id: 9
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
Raw Size: 70007MB [0x88bb998 Sectors]
Non Coerced Size: 69495MB [0x87bb998 Sectors]
Coerced Size: 68664MB [0x861c000 Sectors]
Firmware state: Online
SAS Address(0): 0x5000c5000582b6a9
SAS Address(1): 0x0
Connected Port Number: 1 
Inquiry Data: SEAGATE ST373455SS      00023LQ0HH5R


# megacli -AdpBbuCmd -a0
                                     
BBU status for Adapter: 0

BatteryType: iBBU
Voltage: 5597 mV
Current: 0 mA
Temperature: 23 C
Firmware Status: 00000000

Battery state: 

GasGuageStatus:
  Fully Discharged        : No
  Fully Charged           : Yes
  Discharging             : Yes
  Initialized             : Yes
  Remaining Time Alarm    : No
  Remaining Capacity Alarm: No
  Discharge Terminated    : No
  Over Temperature        : No
  Charging Terminated     : No
  Over Charged            : No

Relative State of Charge: 98 %
Charger System State: 4097
Charger System Ctrl: 5
Charging current: 0 mA
Absolute state of charge: 105 %
Max Error: 2 %

BBU Capacity Info for Adapter: 0

Relative State of Charge: 98 %
Absolute State of charge: 105 %
Remaining Capacity: 922 mAh
Full Charge Capacity: 943 mAh
Run time to empty: 65535 Min
Average time to empty: 65535 Min
Average Time to full: 65535 Min
Cycle Count: 21
Max Error: 2 %
Remaining Capacity Alarm: 100 mAh
Remaining Time Alarm: 10 Min


BBU Design Info for Adapter: 0

Date of Manufacture: 12/09, 2006
Design Capacity: 880 mAh
Design Voltage: 4800 mV
Specification Info: 33
Serial Number: 548
Pack Stat Configuration: 0x6890
Manufacture Name: lsia11000a
Device Name: *5808-2
Device Chemistry: NiMH


BBU Properties for Adapter: 0

Auto Learn Period: 2592000 Sec
Next Learn time: 266341091 Sec 
Learn Delay Interval:0 Hours
Auto-Learn Mode: Enabled

>Fix:

--- linux-megacli-1.01.40_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/linux-megacli/Makefile,v
retrieving revision 1.6
diff -u -p -u -r1.6 Makefile
--- Makefile	19 Mar 2008 03:23:36 -0000	1.6
+++ Makefile	15 May 2008 07:35:00 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	megacli
 PORTVERSION=	1.01.40
+PORTREVISION=	1
 CATEGORIES=	sysutils linux
 MASTER_SITES=	http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/
 PKGNAMEPREFIX=	linux-
Index: files/407.status-mfi-raid.in
===================================================================
RCS file: /home/ncvs/ports/sysutils/linux-megacli/files/407.status-mfi-raid.in,v
retrieving revision 1.3
diff -u -p -u -r1.3 407.status-mfi-raid.in
--- files/407.status-mfi-raid.in	17 Apr 2008 20:07:53 -0000	1.3
+++ files/407.status-mfi-raid.in	15 May 2008 07:34:36 -0000
@@ -67,7 +67,7 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX
 			E=-1; S=-1; D=-1; s=-1; mec=-1; oec=-1; pfc=-1; lpfeqn=-1;
 			state="";
 		}
-		/^Enclosure Number:/ { E=$3; }
+		/^Enclosure (Number|Device ID):/ { E=$3; }
 		/^Slot Number:/ { S=$3; }
 		/^Device Id:/ { D=$3; }
 		/^Sequence Number:/ { s=$3; }
@@ -137,15 +137,15 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX
 		}
 		/^BatteryType:/ { type=$2; }
 		/^Temperature:/ { temp=$2; }
-		/^isSOHGood:/ { isok=$2; }
+		/Fully Charged/ { isok=$4; }
 		/^Relative State of Charge:/ { rsoc=$5; }
 		/^Absolute State of charge:/ { asoc=$5; }
 		/^Remaining Capacity:/ { rc=$3; }
 		/^Cycle Count:/ { cc=$3; }
 		/^Max Error:/ { me=$3; }
 		END {
-			printf "TYPE TEMP OK   RSOC  ASOC  RC   CC    ME\n";
-			printf "%-4s %-2d C %-4s %-5d %-5d %-5d %-5d %-2d\n",
+			printf "TYPE TEMP  OK   RSOC  ASOC      RC      CC  ME\n";
+			printf "%-4s  %2dC  %-3s %4d%% %4d%% %4dmAh %4dmAh %2d%%\n",
 				type, temp, isok, rsoc, asoc, rc, cc, me;
 
 		}
--- linux-megacli-1.01.40_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805150738.m4F7c9bw048048>