Jon,

I committed the attached patch to fix the issue.

ambackup should not print the server-src on the 'SUCCESS dumper' line.
Fix the report to parse it so that it can parse log file with the bogus 
server-src

Jean-Louis

On 25/09/17 05:28 PM, Jon LaBadie wrote:
> On Mon, Sep 25, 2017 at 08:57:31AM -0400, Jean-Louis Martineau wrote:
> > Jon,
> >
> > Can you post the log.<datestamps>.0 file?
> >
> > Jean-Louis
> >
> > On 24/09/17 05:59 PM, Jon LaBadie wrote:
> > > When I request a backup of a client using ambackupd, the subsequent
> > > report does not include most of the dump statistics (first line of
> > > data). Some of them print out on the next regular amdump run when
> > > the client backup is flushed from the holding disk to the storage
> > > (second line of data) medium. The dump time and rate are nor
> > > reported in either report.
> > >
> > > Is this an oversight or is there a reason they can not be reported?
>
> Those log files were no longer available so I just ran a new set.
>
> Here is a log, the email report follows.
>
> INFO ambackupd ambackupd pid 20275
> START ambackupd date 20170925164612
> STATS ambackupd hostname mums.jgcomp.com 
> <http://mums.jgcomp.com>
> DISK ambackupd vost.jgcomp.com 
> <http://vost.jgcomp.com> 
> Root
> SUCCESS dumper vost.jgcomp.com 
> <http://vost.jgcomp.com> 
> Root 20170925164612 1 \
> a0311982:661278720 a7e75a37:188633372 a7e75a37:188633372 \
> [sec 297.261288 kb 184212 kps 619.697240900066 orig-kb 645780]
> SUCCESS chunker vost.jgcomp.com 
> <http://vost.jgcomp.com> 
> Root 20170925164612 1 \
> a7e75a37:188633372 \
> [sec 297.261288 kb 184212 kps 619.697240900066]
> FINISH ambackupd date 20170925164612 time 297.261288
> INFO ambackupd pid-done 20275
>
>
> STATISTICS:
> Total Full Incr. Level:#
> -------- -------- -------- --------
> Estimate Time (hrs:min) 0:00
> Run Time (hrs:min) 0:00
> Dump Time (hrs:min) 0:00 0:00 0:00
> Output Size (meg) 179.9 0.0 179.9
> Original Size (meg) 0.0 0.0 0.0
> Avg Compressed Size (%) -- -- --
> DLEs Dumped 1 0 1 1:1
> Avg Dump Rate (k/s) -- -- --
>
> Tape Time (hrs:min) 0:00 0:00 0:00
> Tape Size (meg) 0.0 0.0 0.0
> Tape Used (%) 0.0 0.0 0.0
> DLEs Taped 0 0 0
> Parts Taped 0 0 0
> Avg Tp Write Rate (k/s) -- -- --
>
> DUMP SUMMARY:
> DUMPER STATS TAPER STATS
> HOSTNAME DISK L ORIG-MB OUT-MB COMP% MMM:SS KB/s MMM:SS KB/s
> ----------------------------- ---------------------- -------------- 
> -------------
> vost.jgcomp.com 
> <http://vost.jgcomp.com> 
> Root 1 0 180 -- 0:00 0.0
>
> (brought to you by Amanda version 3.4.1)
>
> -- 
> Jon H. LaBadie j...@jgcomp.com
> 11226 South Shore Rd. (703) 787-0688 (H)
> Reston, VA 20190 (703) 935-6720 (C)
This message is the property of CARBONITE, INC. and may contain confidential or 
privileged information.
If this message has been delivered to you by mistake, then do not copy or 
deliver this message to anyone.  Instead, destroy it and notify me by reply 
e-mail
diff --git a/perl/Amanda/Report.pm b/perl/Amanda/Report.pm
index 2f9653f..b2a7088 100644
--- a/perl/Amanda/Report.pm
+++ b/perl/Amanda/Report.pm
@@ -976,8 +976,10 @@ sub _handle_dumper_line
 	my $x;
 	if ($info[4] eq '[sec') {
 	    $x = 5;
-	} else {
+	} elsif ($info[6] eq '[sec') {
 	    $x = 7; #native and client crc
+	} else {
+	    $x = 8; #native, client crc and server crc
 	}
         my ( $sec, $kb, $kps, $orig_kb ) = @info[ $x, $x+2, $x+4, $x+6 ];
 	$kb = int($kb/1024) if $info[$x+1] eq 'bytes';
diff --git a/server-src/ambackupd.pl b/server-src/ambackupd.pl
index af8bc8b..ead2889 100644
--- a/server-src/ambackupd.pl
+++ b/server-src/ambackupd.pl
@@ -918,7 +918,7 @@ sub do_backup {
 	    log_end_multiline();
 	} else {
 	    print {$self->{'mesg_fh'}} "backup done: " . Amanda::Util::quote_string($self->{'diskname'}) . "\n";
-	    log_add_full($L_SUCCESS, "dumper", "$self->{'hostname'} $self->{'qdiskname'} $self->{'timestamp'} $self->{'hdr'}->{'dumplevel'} $self->{'native_crc'} $self->{'client_crc'} $self->{'server_crc'} [sec $self->{'dump_time'} kb $kb kps $kps orig-kb $self->{'orig_size'}]");
+	    log_add_full($L_SUCCESS, "dumper", "$self->{'hostname'} $self->{'qdiskname'} $self->{'timestamp'} $self->{'hdr'}->{'dumplevel'} $self->{'native_crc'} $self->{'client_crc'} [sec $self->{'dump_time'} kb $kb kps $kps orig-kb $self->{'orig_size'}]");
 	}
 	log_add_full($L_SUCCESS, "chunker", "$self->{'hostname'} $self->{'qdiskname'} $self->{'timestamp'} $self->{'hdr'}->{'dumplevel'} $self->{'server_crc'} [sec $self->{'dump_time'} kb $kb kps $kps]");
 	$steps->{'quit'}->();

Reply via email to