git-svn-id: http://svn.centreon.com/trunk/plugins@3464 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2007-11-12 21:53:54 +00:00
parent 7deaa6d93c
commit 2aa3b2c2b6

View File

@ -77,7 +77,6 @@ if ($opt_V) {
if ($opt_h) {
print_help();
exit $ERRORS{'OK'};
Getopt::Long::Configure('bundling');
}
@ -293,7 +292,7 @@ if (defined($opt_T)){
$speed_card = $opt_T * 1000000;
} else {
$speed_card = $result->{$OID_SPEED};
if (!$speed_card) {
if (!$speed_card && !defined($opt_T)) {
print "Error : Card speed is null, check command options\n";
exit $ERRORS{'UNKNOWN'};
}
@ -447,12 +446,10 @@ my $status = "OK";
if(($in_usage > $warning) or ($out_usage > $warning)){
$status = "WARNING";
}
if (($in_usage > $critical) or ($out_usage > $critical)){
$status = "CRITICAL";
}
printf("Traffic In : %.2f ".$in_prefix."b/s (".$in_usage." %%), Out : %.2f ".$out_prefix."b/s (".$out_usage." %%) - ", $in_traffic, $out_traffic);
printf("Total RX Bits In : %.2f ".$in_bits_unit."B, Out : %.2f ".$out_bits_unit."b", $in_bits, $out_bits);
printf("|traffic_in=".$in_perfparse_traffic_str."Bits/s traffic_out=".$out_perfparse_traffic_str."Bits/s\n");
@ -475,7 +472,6 @@ sub print_usage () {
print " (default 80)\n";
print " -c (--crit) Signal strength at which a critical message will be generated\n";
print " -T Max Banwidth\n";
print " (default 95)\n";
print " -V (--version) Plugin version\n";
print " -h (--help) usage help\n";
}