mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 16:14:21 +02:00
Fix swap aix usage
This commit is contained in:
parent
ac85e08d71
commit
4c912bb066
@ -118,7 +118,7 @@ sub new {
|
|||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
"paging-state-buggy" => { name => 'paging_state_buggy' },
|
'paging-state-buggy' => { name => 'paging_state_buggy' },
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -186,13 +186,16 @@ sub manage_selection {
|
|||||||
$self->{global}->{nactive}++;
|
$self->{global}->{nactive}++;
|
||||||
|
|
||||||
my $swap_name = $results->{$aix_swap_pool}->{$aix_swap_name . "." . $_};
|
my $swap_name = $results->{$aix_swap_pool}->{$aix_swap_name . "." . $_};
|
||||||
|
my $used = ($results->{$aix_swap_pool}->{$aix_swap_usage . "." . $_} * $results->{$aix_swap_pool}->{$aix_swap_total . "." . $_} / 100)
|
||||||
|
* 1024 * 1024;
|
||||||
|
my $total = $results->{$aix_swap_pool}->{$aix_swap_total . "." . $_} * 1024 * 1024;
|
||||||
$self->{swap}->{$swap_name} = {
|
$self->{swap}->{$swap_name} = {
|
||||||
display => $swap_name,
|
display => $swap_name,
|
||||||
used => $results->{$aix_swap_pool}->{$aix_swap_usage . "." . $_},
|
used => $used,
|
||||||
total => $results->{$aix_swap_pool}->{$aix_swap_total . "." . $_} * 1024 * 1024,
|
total => $total,
|
||||||
};
|
};
|
||||||
$self->{global}->{used} += $self->{swap}->{$swap_name}->{used};
|
$self->{global}->{used} += $used;
|
||||||
$self->{global}->{total} += $self->{swap}->{$swap_name}->{total};
|
$self->{global}->{total} += $total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user