/[smecontribs]/rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-megaraid_fix_raid10.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-megaraid_fix_raid10.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Jul 8 12:39:31 2009 UTC (15 years, 4 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-zabbix-agent-0_1-34_el4_sme, smeserver-zabbix-agent-0_1-35_el4_sme, smeserver-zabbix-agent-0_1-46_el4_sme, smeserver-zabbix-agent-0_1-42_el4_sme, smeserver-zabbix-agent-0_1-41_el4_sme, smeserver-zabbix-agent-0_1-49_el4_sme, smeserver-zabbix-agent-0_1-38_el4_sme, smeserver-zabbix-agent-0_1-47_el4_sme, smeserver-zabbix-agent-0_1-50_el4_sme, smeserver-zabbix-agent-0_1-32_el4_sme, smeserver-zabbix-agent-0_1-39_el4_sme, smeserver-zabbix-agent-0_1-45_el4_sme, smeserver-zabbix-agent-0_1-51_el4_sme, smeserver-zabbix-agent-0_1-44_el4_sme, smeserver-zabbix-agent-0_1-52_el4_sme, smeserver-zabbix-agent-0_1-48_el4_sme, smeserver-zabbix-agent-0_1-36_el4_sme, smeserver-zabbix-agent-0_1-37_el4_sme, smeserver-zabbix-agent-0_1-33_el4_sme, smeserver-zabbix-agent-0_1-43_el4_sme, smeserver-zabbix-agent-0_1-40_el4_sme, HEAD
Fixe megaraid-parser.pl for RAID-10 arrays

1 --- smeserver-zabbix-agent-0.1/root/var/lib/zabbix/bin/megaraid-parser.pl.megaraid_fix_raid10 2009-07-08 14:24:25.000000000 +0200
2 +++ smeserver-zabbix-agent-0.1/root/var/lib/zabbix/bin/megaraid-parser.pl 2009-07-08 14:33:00.000000000 +0200
3 @@ -111,7 +111,7 @@
4 open (LDINFO, "$megacli -LdInfo -L$ld -a$adp |")
5 || die "error: Could not execute $megacli -LdInfo -L$ld -a$adp";
6
7 - my ($size, $unit, $raidlevel, $ldpdcount, $state);
8 + my ($size, $unit, $raidlevel, $ldpdcount, $spandepth, $state);
9 while (<LDINFO>) {
10 if ( m/Size:\s*((\d+)(MB|GB|TB))/ ) {
11 $size = $2;
12 @@ -126,8 +126,11 @@
13 if ( $state ne 'Optimal' ) {
14 $status = 'CRITICAL';
15 }
16 - } elsif ( m/Number Of Drives:\s*(\d+)/ ) {
17 - $ldpdcount = $1;
18 + } elsif ( m/Number Of Drives( per span)?:\s*(\d+)/ ) {
19 + $ldpdcount = $2;
20 + } elsif ( m/Span Depth:\s*(\d+)/ ) {
21 + $spandepth = $1;
22 + $ldpdcount = $ldpdcount * $spandepth;
23 } elsif ( m/RAID Level: Primary-(\d)/ ) {
24 $raidlevel = $1;
25 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed