X-Git-Url: http://git.pippins.net/embedvideo/.git/static/gitweb.js?a=blobdiff_plain;f=zfs-log-parser;h=4ecca3c37e59db5a4aaeecfa9dea6277b4dda928;hb=798e06b3eaab3692c8241d27670283f79210242a;hp=2167493f9676a2d91fd538b6a569a28605acec40;hpb=698062c29aad5253bc10d488958de289055429e5;p=zfs-ubuntu%2F.git diff --git a/zfs-log-parser b/zfs-log-parser index 2167493..4ecca3c 100755 --- a/zfs-log-parser +++ b/zfs-log-parser @@ -159,7 +159,11 @@ sub parse_snapshot_totals_logfile { # MAIN ######### #print "-> Parsing $logfile\n"; -open(FILE,"$logfile") || die "-E- Unable to open $logfile\n"; +if("$logfile" =~ /\.[bz2|gz]/) { + open(FILE,"zcat $logfile|") || die "-E- Unable to open $logfile\n"; +} else { + open(FILE,"$logfile") || die "-E- Unable to open $logfile\n"; +} if($logfile =~ /replicate/) { parse_replicate_logfile(); } if($logfile =~ /snapshot-totals/) { parse_snapshot_totals_logfile(); }