Removed MNTTAB autodetection again as it seems to be already defined.
Don't skip rest of mountpoints if one is not accessible. chdir to / while sleeping to avoid blocking automounters increased default sleep interval to 1 hour max.
This commit is contained in:
parent
b2865e2946
commit
e0484a7006
|
@ -1,11 +1,11 @@
|
|||
# $Id: GNUmakefile,v 1.2 2000-06-04 16:11:12 hjp Exp $
|
||||
# $Id: GNUmakefile,v 1.3 2000-06-04 16:33:20 hjp Exp $
|
||||
|
||||
include GNUmakevars
|
||||
|
||||
ddm: ddm.o
|
||||
$(CC) $^ $(ANTLIB) -o $@
|
||||
|
||||
ddm.o: ddm.c cfg/mnttab.h
|
||||
ddm.o: ddm.c
|
||||
|
||||
clean:
|
||||
rm ddm ddm.o
|
||||
|
@ -20,7 +20,13 @@ include GNUmakerules
|
|||
-include ddm.d
|
||||
|
||||
# $Log: GNUmakefile,v $
|
||||
# Revision 1.2 2000-06-04 16:11:12 hjp
|
||||
# Revision 1.3 2000-06-04 16:33:20 hjp
|
||||
# Removed MNTTAB autodetection again as it seems to be already defined.
|
||||
# Don't skip rest of mountpoints if one is not accessible.
|
||||
# chdir to / while sleeping to avoid blocking automounters
|
||||
# increased default sleep interval to 1 hour max.
|
||||
#
|
||||
# Revision 1.2 2000/06/04 16:11:12 hjp
|
||||
# Added autodetection of /etc/m(nt)?tab.
|
||||
#
|
||||
# Revision 1.1 2000/06/04 15:53:18 hjp
|
||||
|
|
20
ddm/ddm.c
20
ddm/ddm.c
|
@ -1,5 +1,5 @@
|
|||
char ddm_c_rcs_id[] =
|
||||
"$Id: ddm.c,v 1.3 2000-06-04 16:19:00 hjp Exp $";
|
||||
"$Id: ddm.c,v 1.4 2000-06-04 16:33:21 hjp Exp $";
|
||||
/*
|
||||
* ddm - disk delay monitor
|
||||
*
|
||||
|
@ -20,8 +20,6 @@ char ddm_c_rcs_id[] =
|
|||
|
||||
#include <ant/da.h>
|
||||
|
||||
#include "cfg/mnttab.h"
|
||||
|
||||
static double gettimestamp(void) {
|
||||
struct timeval tm;
|
||||
|
||||
|
@ -75,7 +73,7 @@ int main(int argc, char**argv) {
|
|||
if (chdir(dirs[i]) == -1) {
|
||||
fprintf(stderr, "%s: %.6f: chdir %s failed: %s\n",
|
||||
argv[0], gettimestamp(), dirs[i], strerror(errno));
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "%s: %.6f: chdir %s ok\n",
|
||||
argv[0], gettimestamp(), dirs[i]);
|
||||
|
@ -83,7 +81,7 @@ int main(int argc, char**argv) {
|
|||
if ((dp = opendir(".")) == NULL) {
|
||||
fprintf(stderr, "%s: %.6f: opendir %s failed: %s\n",
|
||||
argv[0], gettimestamp(), dirs[i], strerror(errno));
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
for (j = 0;(de = readdir(dp)); j++) {
|
||||
DA_MKIND_INI(entries, j, NULL);
|
||||
|
@ -103,7 +101,9 @@ int main(int argc, char**argv) {
|
|||
}
|
||||
}
|
||||
|
||||
sleeptime = rand() * 60.0 / RAND_MAX;
|
||||
chdir("/");
|
||||
|
||||
sleeptime = rand() * 3600.0 / RAND_MAX;
|
||||
fprintf(stderr, "%s: %.6f: sleeping %d seconds\n",
|
||||
argv[0], gettimestamp(), sleeptime);
|
||||
sleep(sleeptime);
|
||||
|
@ -115,7 +115,13 @@ int main(int argc, char**argv) {
|
|||
|
||||
/*
|
||||
* $Log: ddm.c,v $
|
||||
* Revision 1.3 2000-06-04 16:19:00 hjp
|
||||
* Revision 1.4 2000-06-04 16:33:21 hjp
|
||||
* Removed MNTTAB autodetection again as it seems to be already defined.
|
||||
* Don't skip rest of mountpoints if one is not accessible.
|
||||
* chdir to / while sleeping to avoid blocking automounters
|
||||
* increased default sleep interval to 1 hour max.
|
||||
*
|
||||
* Revision 1.3 2000/06/04 16:19:00 hjp
|
||||
* Fixed order of args in fprintf (segfault).
|
||||
*
|
||||
* Revision 1.2 2000/06/04 16:11:12 hjp
|
||||
|
|
Loading…
Reference in New Issue