Monitorering af DELL MD3200i SAN

Desværre supportere DELL MD3200i ikke SNMP, men her er et perl script som kan benyttes til trække oplysninger om:

  • globalstatus
  • extendedstatus
  • vmdisk
  • totalio
  • readpercentage
  • cachehitpercentage
  • currentkbpersecond
  • maximumkbpersecond
  • currentiopersecond
  • maximumiopersecond

 

Gem som fil-navn: md3200i_perfstat.pl

script:

#!/usr/bin/perl -w

use strict;
#Skift $SMcli= path til din egen!
my $SMcli="C:\\Program Files (x86)\\Dell\\MD Storage Software\\MD Storage Manager\\client\\SMcli.exe";
my ($x,$host,$vm,$arg,$find_only);
for $x ( 0 .. $#ARGV ){

$arg = $ARGV[$x];

if ( $arg eq "-H" ){
$find_only = 1;
$x++;
$host = ${ARGV[$x]};
next;
}

if ( $arg eq "-v" ){
$x++;
$vm = ${ARGV[$x]};
next;
}

}

#Execute SMcli command
#my $cmd = "$SMcli $host -S -quick -c \"show virtualDisk [\\\"$vm\\\"] performanceStats;\"";
my $cmd = "$SMcli $host -S -quick -c \"show allVirtualDisks performanceStats;\"";
#print "$cmd \n";

if(!open(PIPE, "$cmd|"))
{
die("Could not execute $cmd");
}

my $globalstatus = "";
my $extendedstatus = "";
my $vmdisk = "";
my $totalio = "";
my $readpercentage = "";
my $cachehitpercentage = "";
my $currentkbpersecond = "";
my $maximumkbpersecond = "";
my $currentiopersecond = "";
my $maximumiopersecond = "";
while(my $line = <PIPE>)
{
chomp($line);
#if($line =~ /Virtual Disk/)
if($line =~ /STORAGE ARRAY TOTALS/)
{
$globalstatus = $line;
# print "\"Storage Arrays \",\"Total IOs \",\"Read Percentage \",\"Cache Hit Percentage \",\"Current KB/second \",\"Maximum KB/second \",\"Current IO/second \",\"Maximum IO/second\" \n";
# print "$line \n";
($vmdisk, $totalio, $readpercentage, $cachehitpercentage, $currentkbpersecond, $maximumkbpersecond, $currentiopersecond, $maximumiopersecond) = split (",", $line);
$totalio =~ s/\"//g;
$readpercentage =~ s/\"//g;
$cachehitpercentage =~ s/\"//g;
$currentkbpersecond =~ s/\"//g;
$maximumkbpersecond =~ s/\"//g;
$currentiopersecond =~ s/\"//g;
$maximumiopersecond =~ s/\"//g;

#print "totalio:$totalio readpercentage:$readpercentage cachehitpercentage:$cachehitpercentage currentkbpersecond:$currentkbpersecond maximumkbpersecond:$maximumkbpersecond currentiopersecond:$currentiopersecond maximumiopersecond:$maximumiopersecond";
print "$currentkbpersecond";

}
else
{
$extendedstatus .= $line;
}
}

close(PIPE);

 

 

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *