# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
use strict;
+use English;
+use Getopt::Long;
# nagios exit codes
my %CODE = (
};
}
+my $usage = "$PROGRAM_NAME: Usage: $PROGRAM_NAME [--ignore-transfer-speed=<pd> [--ignore-transfer-speed=<pd> ...]]\n";
+my $params;
+Getopt::Long::Configure('bundling');
+if (!GetOptions (
+ '--help' => \$params->{'help'},
+ '--ignore-transfer-speed=s@' => \$params->{'ignore-transfer-speed'},
+ )) {
+ die ($usage);
+};
+if ($params->{'help'}) {
+ print $usage;
+ exit (0);
+};
+die ($usage) unless (scalar @ARGV == 0);
my $ctrlallshow = runcmd("controller all show");
my @controllers;
next;
}
+ if (exists $params->{'ignore-transfer-speed'}) {
+ if (grep { $drive eq $_ } @{$params->{'ignore-transfer-speed'}}) {
+ push @{$status{'ignored transfer speed'}}, $drive."(".$value{$key}.")";
+ };
+ next;
+ };
if (!defined $value{$key}) {
record('WARNING');
push @{$status{'unknown transfer speed'}}, $drive;