Date: Tue, 05 Jan 1999 14:16:07 -0500 From: Harlan Stenn <Harlan.Stenn@pfcs.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/9333: timestamp dump's progress Message-ID: <22491.915563767@brown.pfcs.com>
next in thread | raw e-mail | index | archive | help
>Number: 9333
>Category: bin
>Synopsis: timestamp dump's progress
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 5 11:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22491.915563767>
