Commit 9def6ec5 authored by Fulvio Galeazzi's avatar Fulvio Galeazzi
Browse files

2020-02-06: FG; Updated to match new output from 'osd df' command.

parent 47877156
...@@ -171,7 +171,7 @@ foreach my $_lineS (@_dataSize) ...@@ -171,7 +171,7 @@ foreach my $_lineS (@_dataSize)
next unless ($fields[0] =~ /^\d+$/); next unless ($fields[0] =~ /^\d+$/);
my $osdNum = $fields[0]; my $osdNum = $fields[0];
my $type = $fields[1]; my $type = $fields[1];
my $frac = $fields[7]; my $frac = $fields[11];
my $size = $fields[4]; my $size = $fields[4];
$size =~ s/iB$//; $size =~ s/iB$//;
$size =~ s/B$//; $size =~ s/B$//;
......
...@@ -41,7 +41,7 @@ sub convertNumber ...@@ -41,7 +41,7 @@ sub convertNumber
} elsif ($lastChar eq "m") { } elsif ($lastChar eq "m") {
$value = $string * 0.001 * 0.001; $value = $string * 0.001 * 0.001;
} elsif ($lastChar eq "k") { } elsif ($lastChar eq "k") {
$value = $string * 0.001 * 0.001; $value = $string * 0.001 * 0.001 * 0.001;
} else { } else {
$value = $value * 0.001 * 0.001 * 0.001 * 0.001; $value = $value * 0.001 * 0.001 * 0.001 * 0.001;
} }
......
...@@ -43,7 +43,7 @@ sub convertNumber ...@@ -43,7 +43,7 @@ sub convertNumber
} elsif ($lastChar eq "m") { } elsif ($lastChar eq "m") {
$value = $string * 0.001 * 0.001; $value = $string * 0.001 * 0.001;
} elsif ($lastChar eq "k") { } elsif ($lastChar eq "k") {
$value = $string * 0.001 * 0.001; $value = $string * 0.001 * 0.001 * 0.001;
} else { } else {
$value = $value * 0.001 * 0.001 * 0.001 * 0.001; $value = $value * 0.001 * 0.001 * 0.001 * 0.001;
} }
......
...@@ -194,7 +194,7 @@ foreach my $_line (@_data) ...@@ -194,7 +194,7 @@ foreach my $_line (@_data)
next unless ($fields[0] =~ /^\d+$/); next unless ($fields[0] =~ /^\d+$/);
my $osdNum = $fields[0]; my $osdNum = $fields[0];
my $type = $fields[1]; my $type = $fields[1];
my $frac = $fields[7]; my $frac = $fields[10];
my $size = $fields[4]; my $size = $fields[4];
$size =~ s/iB$//; $size =~ s/iB$//;
$size =~ s/B$//; $size =~ s/B$//;
......
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