elsif(($in_totals == 1) && ($line =~ /^\s+$/)) {
$in_totals = 0;
}
- elsif(($in_totals == 1) && ($line =~ /(\S+)\s+([\d\.]+)(\w+)\s+(\d+)/)) {
+ elsif(($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 =~ /Snapshots/ || $filesystem =~ /Total/) { next; }
if($filesystem =~ /$backup_pool/) { next; }
if(length($filesystem) > $maxlen) { $maxlen = length($filesystem); }
if($size =~ /K/i) { $data = $data * $kilo; }
foreach $date (sort keys %$hashref) {
if($date !~ /(\d+)-(\d+)-(\d+)/) { next; }
$date_data=adjust_data($totals{$filesystem}{$date}{data});
+ if($date_data eq "") { $date_data = "0"; }
$data .= sprintf("%10s",$date_data). " ";
$date_totals{$date}{data} += $totals{$filesystem}{$date}{data};
}