diff options
author | edwin <edwin@FreeBSD.org> | 2008-06-18 21:02:46 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2008-06-18 21:02:46 +0800 |
commit | 59a7cde9b6a36dd87f0b3474bfad78a8aa252c88 (patch) | |
tree | 84d34e5904b3a3c4d9b7717e068a5715f1da32ba /sysutils/linux-megacli | |
parent | 7b51060306d40376896463132bc599d98ba3e5e6 (diff) | |
download | freebsd-ports-gnome-59a7cde9b6a36dd87f0b3474bfad78a8aa252c88.tar.gz freebsd-ports-gnome-59a7cde9b6a36dd87f0b3474bfad78a8aa252c88.tar.zst freebsd-ports-gnome-59a7cde9b6a36dd87f0b3474bfad78a8aa252c88.zip |
[PATCH] sysutils/linux-megacli: Fix periodic script after update
- 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)
PR: ports/123697
Submitted by: Ulrich Spoerlein <uspoerlein@gmail.com>
Approved by: Ruben van Staveren <ruben@verweg.com>
Diffstat (limited to 'sysutils/linux-megacli')
-rw-r--r-- | sysutils/linux-megacli/Makefile | 1 | ||||
-rw-r--r-- | sysutils/linux-megacli/files/407.status-mfi-raid.in | 15 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sysutils/linux-megacli/Makefile b/sysutils/linux-megacli/Makefile index 49a22507b228..40163981d265 100644 --- a/sysutils/linux-megacli/Makefile +++ b/sysutils/linux-megacli/Makefile @@ -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- diff --git a/sysutils/linux-megacli/files/407.status-mfi-raid.in b/sysutils/linux-megacli/files/407.status-mfi-raid.in index 77455a87c3d2..7cc22298aa9c 100644 --- a/sysutils/linux-megacli/files/407.status-mfi-raid.in +++ b/sysutils/linux-megacli/files/407.status-mfi-raid.in @@ -67,7 +67,7 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX} ${ADPMAXIDX}`; do 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; } @@ -127,12 +127,11 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX} ${ADPMAXIDX}`; do } } ' - echo - echo "BBU Information:" + # Print BBU Information, if we found something ${megacli} -AdpBbuCmd -a${ctrl} | \ awk ' BEGIN { - type=""; temp=-1; isok=-1; rsoc=-1; asoc=-1; + type=""; temp=-1; isok="-"; rsoc=-1; asoc=-1; rc=-1; cc=-1; me=-1; } /^BatteryType:/ { type=$2; } @@ -144,13 +143,15 @@ for ctrl in `jot ${ADPCOUNT} ${ADPMINIDX} ${ADPMAXIDX}`; do /^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", + if (type == "") { exit 0 }; + printf "\nBBU Information:\n" + printf "TYPE TEMP OK RSOC ASOC RC CC ME\n"; + printf "%-5s %2dC %-3s %4d%% %4d%% %4dmAh %4d %2d%%\n", type, temp, isok, rsoc, asoc, rc, cc, me; } ' - echo + echo # Give very long outputs. case "$daily_status_mfi_raid_verbose" in |