From: Alan J. Pippin Date: Sat, 16 Feb 2019 02:18:48 +0000 (-0700) Subject: Updated replicate size to work with K M or G X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/.%24link.?a=commitdiff_plain;h=621be18ea5c913faa24d1e099120eddfb49c212b;p=zfs-ubuntu%2F.git Updated replicate size to work with K M or G Change-Id: I4e83ae8665f24561bd34c1b8085277826c402e3e --- 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; }