On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate. PR: bin/32138 Submitted by: mi
This commit is contained in:
parent
ebc1fff946
commit
19f8080e63
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90742
@ -312,7 +312,8 @@ after the old tape has been rewound and removed,
|
|||||||
and a new tape has been mounted.
|
and a new tape has been mounted.
|
||||||
.Pp
|
.Pp
|
||||||
.Nm Dump
|
.Nm Dump
|
||||||
tells the operator what is going on at periodic intervals,
|
tells the operator what is going on at periodic intervals --
|
||||||
|
every 5 minutes, or promptly after receiving SIGINFO --
|
||||||
including usually low estimates of the number of blocks to write,
|
including usually low estimates of the number of blocks to write,
|
||||||
the number of tapes it will take, the time to completion, and
|
the number of tapes it will take, the time to completion, and
|
||||||
the time to the tape change.
|
the time to the tape change.
|
||||||
|
@ -95,6 +95,7 @@ int tp_bshift; /* log2(TP_BSIZE) */
|
|||||||
|
|
||||||
/* operator interface functions */
|
/* operator interface functions */
|
||||||
void broadcast __P((char *message));
|
void broadcast __P((char *message));
|
||||||
|
void infosch __P((int));
|
||||||
void lastdump __P((int arg)); /* int should be char */
|
void lastdump __P((int arg)); /* int should be char */
|
||||||
void msg __P((const char *fmt, ...)) __printflike(1, 2);
|
void msg __P((const char *fmt, ...)) __printflike(1, 2);
|
||||||
void msgtail __P((const char *fmt, ...)) __printflike(1, 2);
|
void msgtail __P((const char *fmt, ...)) __printflike(1, 2);
|
||||||
|
@ -51,6 +51,7 @@ static const char rcsid[] =
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
|
|
||||||
@ -195,7 +196,7 @@ timeest()
|
|||||||
time_t tnow;
|
time_t tnow;
|
||||||
int deltat;
|
int deltat;
|
||||||
|
|
||||||
(void) time((time_t *) &tnow);
|
(void) time(&tnow);
|
||||||
if (tnow >= tschedule) {
|
if (tnow >= tschedule) {
|
||||||
tschedule = tnow + 300;
|
tschedule = tnow + 300;
|
||||||
if (blockswritten < 500)
|
if (blockswritten < 500)
|
||||||
@ -209,6 +210,16 @@ timeest()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Schedule a printout of the estimate in the next call to timeest().
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
infosch(signal)
|
||||||
|
int signal;
|
||||||
|
{
|
||||||
|
tschedule = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
#if __STDC__
|
||||||
msg(const char *fmt, ...)
|
msg(const char *fmt, ...)
|
||||||
|
@ -617,6 +617,7 @@ startnewtape(top)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enslave(); /* Share open tape file descriptor with slaves */
|
enslave(); /* Share open tape file descriptor with slaves */
|
||||||
|
signal(SIGINFO, infosch);
|
||||||
|
|
||||||
asize = 0;
|
asize = 0;
|
||||||
blocksthisvol = 0;
|
blocksthisvol = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user