From 621be18ea5c913faa24d1e099120eddfb49c212b Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <alan@pippins.net>
Date: Fri, 15 Feb 2019 19:18:48 -0700
Subject: [PATCH] Updated replicate size to work with K M or G

Change-Id: I4e83ae8665f24561bd34c1b8085277826c402e3e
---
 zfs-log-parser | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/zfs-log-parser b/zfs-log-parser
index f13c2a0..560cba2 100755
--- a/zfs-log-parser
+++ b/zfs-log-parser
@@ -66,9 +66,9 @@ sub parse_replicate_logfile {
 	}   
 	if(($in_replicate == 1) && ($line =~ /received ([\d\.]+)(\w+)/)) {
 	    $data = $1; $size = $2;
-	    if($size =~ /Kb/i) { $data = $data * $kilo; }
-	    if($size =~ /Mb/i) { $data = $data * $mega; }
-	    if($size =~ /Gb/i) { $data = $data * $giga; }
+	    if($size =~ /(Kb|K)/i) { $data = $data * $kilo; }
+	    if($size =~ /(Mb|M)/i) { $data = $data * $mega; }
+	    if($size =~ /(Gb|G)/i) { $data = $data * $giga; }
 	    chomp($line);
 	    $totals{$date}{data} += $data;
 	}
-- 
2.34.1