+ Enhance mode netapp

This commit is contained in:
garnier-quentin 2015-07-02 18:57:08 +02:00
parent 655b95a79f
commit 58b5a9a414
2 changed files with 12 additions and 1 deletions

View File

@ -137,9 +137,15 @@ sub custom_usage_calc {
$self->{result_values}->{dfDedupeSavedPercent} = $options{new_datas}->{$self->{instance} . '_dfDedupeSavedPercent'};
return 0 if ($options{new_datas}->{$self->{instance} . '_total'} == 0);
$self->{result_values}->{free} = $self->{result_values}->{total} - $self->{result_values}->{used};
$self->{result_values}->{prct_used} = $self->{result_values}->{used} * 100 / $self->{result_values}->{total};
$self->{result_values}->{free} = $self->{result_values}->{total} - $self->{result_values}->{used};
$self->{result_values}->{prct_free} = 100 - $self->{result_values}->{prct_used};
# snapshot can be over 100%
if ($self->{result_values}->{free} < 0) {
$self->{result_values}->{free} = 0;
$self->{result_values}->{prct_free} = 0;
}
return 0;
}

View File

@ -123,6 +123,11 @@ sub custom_usage_calc {
$self->{result_values}->{prct_used} = $self->{result_values}->{used} * 100 / $self->{result_values}->{total};
$self->{result_values}->{prct_free} = 100 - $self->{result_values}->{prct_used};
$self->{result_values}->{free} = $self->{result_values}->{total} - $self->{result_values}->{used};
# qtree can be over 100%
if ($self->{result_values}->{free} < 0) {
$self->{result_values}->{free} = 0;
$self->{result_values}->{prct_free} = 0;
}
return 0;
}