git-svn-id: http://svn.centreon.com/Plugins/Dev@2963 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
4976d4f23f
commit
31591de2b4
|
@ -189,7 +189,7 @@ if ($opt_n) {
|
||||||
exit $ERRORS{'UNKNOWN'};
|
exit $ERRORS{'UNKNOWN'};
|
||||||
}
|
}
|
||||||
foreach my $key ( oid_lex_sort(keys %$result)) {
|
foreach my $key ( oid_lex_sort(keys %$result)) {
|
||||||
if ($result->{$key} =~ m/$opt_i/) {
|
if ($result->{$key} eq $opt_i) {
|
||||||
my @oid_list = split (/\./,$key);
|
my @oid_list = split (/\./,$key);
|
||||||
$interface = pop (@oid_list) ;
|
$interface = pop (@oid_list) ;
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ if ($flg_created == 0){
|
||||||
if (($in_bits - $last_in_bits > 0) && defined($last_in_bits)) {
|
if (($in_bits - $last_in_bits > 0) && defined($last_in_bits)) {
|
||||||
my $total = 0;
|
my $total = 0;
|
||||||
if ($in_bits - $last_in_bits < 0){
|
if ($in_bits - $last_in_bits < 0){
|
||||||
$total = 4294967296 - $last_in_bits + $in_bits;
|
$total = 4294967296 * 8 - $last_in_bits + $in_bits;
|
||||||
} else {
|
} else {
|
||||||
$total = $in_bits - $last_in_bits;
|
$total = $in_bits - $last_in_bits;
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ if (($in_bits - $last_in_bits > 0) && defined($last_in_bits)) {
|
||||||
if ($out_bits - $last_out_bits > 0 && defined($last_out_bits)) {
|
if ($out_bits - $last_out_bits > 0 && defined($last_out_bits)) {
|
||||||
my $total = 0;
|
my $total = 0;
|
||||||
if ($out_bits - $last_out_bits < 0){
|
if ($out_bits - $last_out_bits < 0){
|
||||||
$total = 4294967296 - $last_out_bits + $out_bits;
|
$total = 4294967296 * 8 - $last_out_bits + $out_bits;
|
||||||
} else {
|
} else {
|
||||||
$total = $out_bits - $last_out_bits;
|
$total = $out_bits - $last_out_bits;
|
||||||
}
|
}
|
||||||
|
@ -351,8 +351,8 @@ if ($out_bits - $last_out_bits > 0 && defined($last_out_bits)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $speed_card != 0 ) {
|
if ( $speed_card != 0 ) {
|
||||||
$in_usage = sprintf("%.1f",($in_traffic*100) / $speed_card);
|
$in_usage = sprintf("%.1f",($in_traffic * 100) / $speed_card);
|
||||||
$out_usage = sprintf("%.1f",($out_traffic*100) / $speed_card);
|
$out_usage = sprintf("%.1f",($out_traffic * 100) / $speed_card);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $in_prefix = "";
|
my $in_prefix = "";
|
||||||
|
|
Loading…
Reference in New Issue