projects
/
zfs-nexenta
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f819dc6
)
Fixed bug in parsing snapshot total logs
author
Alan J. Pippin
<ajp@pippins.net>
Tue, 11 Mar 2008 02:25:23 +0000
(20:25 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Tue, 11 Mar 2008 02:25:23 +0000
(20:25 -0600)
zfs-log-parser
patch
|
blob
|
history
diff --git
a/zfs-log-parser
b/zfs-log-parser
index 5c280032b97c63149c2411ca89e980aba24fc0d1..dbb3c15a88a8e533a05ad30593c35755d84a0c7b 100755
(executable)
--- a/
zfs-log-parser
+++ b/
zfs-log-parser
@@
-94,6
+94,7
@@
sub parse_snapshot_totals_logfile {
$header="";
while(<FILE>) {
$line = $_;
$header="";
while(<FILE>) {
$line = $_;
+ if($line =~ /logfile turned over/) { next; }
if(($in_totals == 0) && ($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;
$in_totals = 1;
if(($in_totals == 0) && ($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;
$in_totals = 1;
@@
-103,10
+104,10
@@
sub parse_snapshot_totals_logfile {
if(!defined $founddates{$date}) { $header .= $date . " "; }
$founddates{$date} = 1;
}
if(!defined $founddates{$date}) { $header .= $date . " "; }
$founddates{$date} = 1;
}
- if(($in_totals == 1) && ($line =~ /^\s+$/)) {
+
els
if(($in_totals == 1) && ($line =~ /^\s+$/)) {
$in_totals = 0;
}
$in_totals = 0;
}
- if(($in_totals == 1) && ($line =~ /(\S+)\s+([\d\.]+)(\w+)\s+(\d+)/)) {
+
els
if(($in_totals == 1) && ($line =~ /(\S+)\s+([\d\.]+)(\w+)\s+(\d+)/)) {
$filesystem = $1; $data = $2; $size = $3; $num_snaps = $4;
if($filesystem =~ /Snapshots/) { next; }
if($filesystem =~ /$backup_pool/) { next; }
$filesystem = $1; $data = $2; $size = $3; $num_snaps = $4;
if($filesystem =~ /Snapshots/) { next; }
if($filesystem =~ /$backup_pool/) { next; }