update tablespace calc oracl
This commit is contained in:
parent
3a0b3656a1
commit
dd00c9b4e9
|
@ -385,16 +385,19 @@ sub manage_selection {
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($percent_used, $percent_free, $used, $free, $size);
|
my ($percent_used, $percent_free, $used, $free, $size);
|
||||||
if ((!defined($bytes_max)) || ($bytes_max == 0)) {
|
if ((!defined($bytes_max)) || ($bytes_max eq '')) {
|
||||||
$percent_used = ($bytes - $bytes_free) / $bytes * 100;
|
$self->{output}->output_add(long_msg => "skipping '" . $name . "': bytes max not defined.", debug => 1);
|
||||||
$size = $bytes;
|
next;
|
||||||
$free = $bytes_free;
|
} elsif ($bytes_max > $bytes) {
|
||||||
$used = $size - $free;
|
|
||||||
} else {
|
|
||||||
$percent_used = ($bytes - $bytes_free) / $bytes_max * 100;
|
$percent_used = ($bytes - $bytes_free) / $bytes_max * 100;
|
||||||
$size = $bytes_max;
|
$size = $bytes_max;
|
||||||
$free = $bytes_free + ($bytes_max - $bytes);
|
$free = $bytes_free + ($bytes_max - $bytes);
|
||||||
$used = $size - $free;
|
$used = $size - $free;
|
||||||
|
} else {
|
||||||
|
$percent_used = ($bytes - $bytes_free) / $bytes * 100;
|
||||||
|
$size = $bytes;
|
||||||
|
$free = $bytes_free;
|
||||||
|
$used = $size - $free;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{tablespace}->{$name} = {
|
$self->{tablespace}->{$name} = {
|
||||||
|
|
Loading…
Reference in New Issue