X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=zfs-log-parser;h=f13c2a01dfa2454940421c9aec909dcef3b5e38e;hb=617f8787bf69842735128cccf91095b82d549ac4;hp=4ecca3c37e59db5a4aaeecfa9dea6277b4dda928;hpb=99d9aa527fad3b987aaf37d43f113fc0d1cfb0fd;p=zfs-ubuntu%2F.git diff --git a/zfs-log-parser b/zfs-log-parser index 4ecca3c..f13c2a0 100755 --- a/zfs-log-parser +++ b/zfs-log-parser @@ -52,14 +52,14 @@ sub parse_replicate_logfile { if(($in_replicate == 0) && ("$startdate" ne "") && ($line !~ /$startdate/)) { next; } if($line =~ /(\S+)\s+(\S+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\S+)\s+(\S+)/) { $dayname=$1; $month=$2; $daynum=$3; $hour=$4; $minute=$5; $sec=$6; $year=$8; - if(($in_replicate == 0) && ($line =~ /lock obtained/)) { + if(($in_replicate == 0) && ($line =~ /replicate started/)) { $in_replicate = 1; $date="$dayname $month $daynum $hour:$minute:$sec $year"; $totals{$date}{data} = 0; $totals{$date}{transfertime} = 0; $totals{$date}{duration} = time_to_seconds($hour,$minute,$sec); } - elsif(($in_replicate == 1) && ($line=~ /lock released/)) { + elsif(($in_replicate == 1) && ($line=~ /replicate complete/)) { $in_replicate = 0; $totals{$date}{duration} = time_to_seconds($hour,$minute,$sec) - $totals{$date}{duration}; } @@ -117,7 +117,7 @@ sub parse_snapshot_totals_logfile { elsif(($in_totals == 1) && ($line =~ /(\S+)\s+([\d\.]*)(\w+)\s+(\d+)/)) { $filesystem = $1; $data = $2; $size = $3; $num_snaps = $4; if($filesystem =~ /Snapshots/ || $filesystem =~ /Total/) { next; } - if($filesystem =~ /$backup_pool/) { next; } + if($filesystem =~ /^$backup_pool/) { next; } if(length($filesystem) > $maxlen) { $maxlen = length($filesystem); } if($size =~ /K/i) { $data = $data * $kilo; } if($size =~ /M/i) { $data = $data * $mega; }