projects
/
zfs-ubuntu
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
698062c
)
Added support for handling compressed files
author
Alan J. Pippin
<ajp@pippins.net>
Fri, 22 Aug 2008 03:23:53 +0000
(21:23 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Fri, 22 Aug 2008 03:23:53 +0000
(21:23 -0600)
zfs-log-parser
patch
|
blob
|
history
diff --git
a/zfs-log-parser
b/zfs-log-parser
index 2167493f9676a2d91fd538b6a569a28605acec40..4ecca3c37e59db5a4aaeecfa9dea6277b4dda928 100755
(executable)
--- 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(); }