From 9def6ec57e150bd149cabf76b2dcfb16be9f501d Mon Sep 17 00:00:00 2001
From: Fulvio Galeazzi <fulvio.galeazzi@garr.it>
Date: Thu, 6 Feb 2020 08:50:22 +0100
Subject: [PATCH] 2020-02-06:  FG;  Updated to match new output from 'osd df'
 command.

---
 Ceph/Script/cephDiskPerf.pl   | 2 +-
 Ceph/Script/cephHealth.pl     | 2 +-
 Ceph/Script/cephUsage.pl      | 2 +-
 Ceph/Script/queryCephDisks.pl | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Ceph/Script/cephDiskPerf.pl b/Ceph/Script/cephDiskPerf.pl
index 8ecf81c..451b9ce 100755
--- a/Ceph/Script/cephDiskPerf.pl
+++ b/Ceph/Script/cephDiskPerf.pl
@@ -171,7 +171,7 @@ foreach my $_lineS (@_dataSize)
     next unless ($fields[0] =~ /^\d+$/);
     my $osdNum = $fields[0];
     my $type = $fields[1];
-    my $frac = $fields[7];
+    my $frac = $fields[11];
     my $size = $fields[4];
     $size =~ s/iB$//;
     $size =~ s/B$//;
diff --git a/Ceph/Script/cephHealth.pl b/Ceph/Script/cephHealth.pl
index b11af66..3e3fc9b 100755
--- a/Ceph/Script/cephHealth.pl
+++ b/Ceph/Script/cephHealth.pl
@@ -41,7 +41,7 @@ sub convertNumber
 	} elsif ($lastChar eq "m") {
 	    $value = $string * 0.001 * 0.001;
 	} elsif ($lastChar eq "k") {
-	    $value = $string * 0.001 * 0.001;
+	    $value = $string * 0.001 * 0.001 * 0.001;
 	} else {
 	    $value = $value * 0.001 * 0.001 * 0.001 * 0.001;
 	}
diff --git a/Ceph/Script/cephUsage.pl b/Ceph/Script/cephUsage.pl
index 7c5fbeb..c9d6e7b 100755
--- a/Ceph/Script/cephUsage.pl
+++ b/Ceph/Script/cephUsage.pl
@@ -43,7 +43,7 @@ sub convertNumber
 	} elsif ($lastChar eq "m") {
 	    $value = $string * 0.001 * 0.001;
 	} elsif ($lastChar eq "k") {
-	    $value = $string * 0.001 * 0.001;
+	    $value = $string * 0.001 * 0.001 * 0.001;
 	} else {
 	    $value = $value * 0.001 * 0.001 * 0.001 * 0.001;
 	}
diff --git a/Ceph/Script/queryCephDisks.pl b/Ceph/Script/queryCephDisks.pl
index 258d16c..08f14a5 100755
--- a/Ceph/Script/queryCephDisks.pl
+++ b/Ceph/Script/queryCephDisks.pl
@@ -194,7 +194,7 @@ foreach my $_line (@_data)
     next unless ($fields[0] =~ /^\d+$/);
     my $osdNum = $fields[0];
     my $type = $fields[1];
-    my $frac = $fields[7];
+    my $frac = $fields[10];
     my $size = $fields[4];
     $size =~ s/iB$//;
     $size =~ s/B$//;
-- 
GitLab