Commit 3f5368bb authored by Dietmar Maurer's avatar Dietmar Maurer

ceph: fix percent_used

parent afb7a23b
......@@ -1141,7 +1141,8 @@ __PACKAGE__->register_method ({
}
if (my $s = $stats->{$d->{pool}}) {
$d->{bytes_used} = $s->{bytes_used};
$d->{percent_used} = ($d->{bytes_used}*100)/$total if $total;
$d->{percent_used} = ($d->{bytes_used}*$d->{size}*100)/$total
if $d->{size} && $total;
}
push @$data, $d;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment