From Harlan.Stenn@pfcs.com  Tue Jan  5 11:16:42 1999
Received: from pcpsj.pfcs.com (harlan.clark.net [168.143.10.179])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA22408
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 5 Jan 1999 11:16:40 -0800 (PST)
          (envelope-from Harlan.Stenn@pfcs.com)
Received: from mumps.pfcs.com [192.52.69.11] (HELO mumps.pfcs.com)
	by pcpsj.pfcs.com (8.8.8/8.8.8) via ESMTP
	id <OAA09706-Harlan.Stenn@pfcs.com> for <FreeBSD-gnats-submit@freebsd.org>;
	Tue, 5 Jan 1999 14:16:09 -0500 (EST)
Received: from brown.pfcs.com [192.52.69.44] (HELO brown.pfcs.com)
	by mumps.pfcs.com (8.8.8/8.8.8) via ESMTP
	id <LAA07852-harlan@pfcs.com> for <FreeBSD-gnats-submit@freebsd.org>;
	Tue, 5 Jan 1999 11:16:08 -0800 (PST)
Received: from localhost [127.0.0.1] (HELO brown.pfcs.com)
	by brown.pfcs.com (8.8.8/8.8.8) via ESMTP
	id <OAA22493-harlan@pfcs.com> for <FreeBSD-gnats-submit@freebsd.org>;
	Tue, 5 Jan 1999 14:16:07 -0500 (EST)
Message-Id: <22491.915563767@brown.pfcs.com>
Date: Tue, 05 Jan 1999 14:16:07 -0500
From: Harlan Stenn <Harlan.Stenn@pfcs.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: timestamp dump's progress
X-Send-Pr-Version: 3.2

>Number:         9333
>Category:       bin
>Synopsis:       timestamp dump's progress
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jkoshy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan  5 11:20:00 PST 1999
>Closed-Date:    Wed Jun 09 02:43:46 GMT 2004
>Last-Modified:  Mon Jun 23 20:00:11 UTC 2008
>Originator:     Harlan Stenn
>Release:        FreeBSD 2.2.8-STABLE i386
>Organization:
PFCS Corporation
>Environment:

    Nothing special

>Description:

    This patch changes the  'X% done, finished in H:M' messages to
    timestamped messages that indicate when the dump is expected to finish:

 DUMP: 3.07% done at Tue Jan  5 01:09:18; will finish at Tue Jan  5 03:47:30.
 DUMP: 11.00% done at Tue Jan  5 01:14:18; will finish at Tue Jan  5 02:35:19.
 DUMP: 18.86% done at Tue Jan  5 01:19:18; will finish at Tue Jan  5 02:23:53.
 DUMP: 28.37% done at Tue Jan  5 01:24:18; will finish at Tue Jan  5 02:14:50.
 DUMP: 37.24% done at Tue Jan  5 01:29:18; will finish at Tue Jan  5 02:11:27.
 DUMP: 45.38% done at Tue Jan  5 01:34:18; will finish at Tue Jan  5 02:10:25.
 DUMP: 52.67% done at Tue Jan  5 01:39:18; will finish at Tue Jan  5 02:10:46.
 DUMP: 62.14% done at Tue Jan  5 01:44:18; will finish at Tue Jan  5 02:08:40.
 DUMP: 71.31% done at Tue Jan  5 01:49:18; will finish at Tue Jan  5 02:07:24.
 DUMP: 78.31% done at Tue Jan  5 01:54:18; will finish at Tue Jan  5 02:08:09.
 DUMP: 87.50% done at Tue Jan  5 01:59:18; will finish at Tue Jan  5 02:07:09.
 DUMP: 94.46% done at Tue Jan  5 02:04:18; will finish at Tue Jan  5 02:07:49.
 DUMP: 101.97% done at Tue Jan  5 02:09:18; will finish at Tue Jan  5 02:08:03.


>How-To-Repeat:

	

>Fix:
	
--- optr.c-	Mon Jan  4 22:48:02 1999
+++ optr.c	Tue Jan  5 01:03:36 1999
@@ -296,9 +296,29 @@
 		deltat = tstart_writing - tnow +
 			(1.0 * (tnow - tstart_writing))
 			/ blockswritten * tapesize;
+#if 0
 		msg("%3.2f%% done, finished in %d:%02d\n",
 			(blockswritten * 100.0) / tapesize,
 			deltat / 3600, (deltat % 3600) / 60);
+#else
+		{
+			char *s_time;
+			time_t etime;
+			char n_time[20];
+
+			s_time = ctime(&tnow);
+			s_time[19] = '\0';
+			strcpy(n_time, s_time);
+
+			etime = tnow + deltat;
+			s_time = ctime(&etime);
+			s_time[19] = '\0';
+
+			msg("%3.2f%% done at %s; will finish at %s.\n",
+			   (blockswritten * 100.0) / tapesize,
+			   n_time, s_time);
+		}
+#endif
 	}
 }
 




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkoshy 
Responsible-Changed-By: jkoshy 
Responsible-Changed-When: Tue Sep 11 02:51:45 PDT 2001 
Responsible-Changed-Why:  
Take ownership of this PR. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=9333 
State-Changed-From-To: open->analyzed 
State-Changed-By: jkoshy 
State-Changed-When: Tue Sep 11 02:52:07 PDT 2001 
State-Changed-Why:  
I have looked at this PR.  Utilities like AMANDA that parse the output  
from dump are likely to be negatively impacted by this change.   

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=9333 

From: <jkoshy@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/9333: timestamp dumps progress
Date: Tue, 11 Sep 2001 02:51:29 -0700 (PDT)

 This change is likely to break utilities like AMANDA which parse the
 output from dump(8).
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: jkoshy 
State-Changed-When: Wed Jun 9 02:41:51 GMT 2004 
State-Changed-Why:  
rev 1.29 of "src/sbin/dump/optr.c" now prints out the estimated 
time of completion of the dump. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=9333 

From: "Chris Rees" <utisoft@googlemail.com>
To: bug-followup@freebsd.org, Harlan.Stenn@pfcs.com, jkoshy@freebsd.org
Cc:  
Subject: Re: bin/9333: timestamp dump's progress
Date: Mon, 23 Jun 2008 20:29:23 +0100

 ------=_Part_5586_27383148.1214249363703
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Sorry to revive an old PR for a pedantic reason... but it would be
 much easier to understand the output of dump if it said
 
 DUMP: xx.xx% done, finishes in xx:xx at [date]
 
 instead of finished. Call me thick, call me fussy, but this to me
 completely changes the meaning. For example, reading 'finished'
 strictly as written appears to mean that xx% was finished in
 [00]h[00]s. It's taken me about six months to understand it actually
 means 'will finish', instead of being a strange bug, like rar's %
 progress.
 
 I know people might sneer, but it's things like this that make Unix
 seem cryptic and arcane.
 
 Thanks for considering this minor patch.
 
 Separate concern, do we really need two decimal places in an
 inaccurate % progress?
 
 Chris
 
 ------=_Part_5586_27383148.1214249363703
 Content-Type: text/x-diff; name=dump-humanreadable.diff
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_fhtgjh4y0
 Content-Disposition: attachment; filename=dump-humanreadable.diff
 
 LS0tIC91c3Ivc3JjL3NiaW4vZHVtcC9vcHRyLmMJMjAwNi0wOC0wNiAxNToyMzo1MC4wMDAwMDAw
 MDAgKzAxMDAKKysrIG9wdHIuYwkyMDA4LTA2LTA4IDIzOjE2OjQ0LjAwMDAwMDAwMCArMDEwMApA
 QCAtMTk1LDEwICsxOTUsMTAgQEAKIAogCSh2b2lkKXRpbWUoJnRub3cpOwogCWlmIChibG9ja3N3
 cml0dGVuID4gdGFwZXNpemUpIHsKLQkJc2V0cHJvY3RpdGxlKCIlczogOTkuOTklJSBkb25lLCBm
 aW5pc2hlZCBzb29uIiwgZGlzayk7CisJCXNldHByb2N0aXRsZSgiJXM6IDk5Ljk5JSUgZG9uZSwg
 ZmluaXNoZXMgc29vbiIsIGRpc2spOwogCQlpZiAodG5vdyA+PSB0c2NoZWR1bGUpIHsKIAkJCXRz
 Y2hlZHVsZSA9IHRub3cgKyAzMDA7Ci0JCQltc2coIjk5Ljk5JSUgZG9uZSwgZmluaXNoZWQgc29v
 blxuIik7CisJCQltc2coIjk5Ljk5JSUgZG9uZSwgZmluaXNoZXMgc29vblxuIik7CiAJCX0KIAl9
 IGVsc2UgewogCQlkZWx0YXQgPSAoYmxvY2tzd3JpdHRlbiA9PSAwKSA/IDAgOiB0c3RhcnRfd3Jp
 dGluZyAtIHRub3cgKwpAQCAtMjExLDEzICsyMTEsMTMgQEAKIAkJdGRvbmVfc3RyID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