summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/lfs_cleanerd/Makefile2
-rw-r--r--libexec/lfs_cleanerd/clean.h2
-rw-r--r--libexec/lfs_cleanerd/cleanerd.c8
-rw-r--r--libexec/lfs_cleanerd/library.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/libexec/lfs_cleanerd/Makefile b/libexec/lfs_cleanerd/Makefile
index c809032..dac065c 100644
--- a/libexec/lfs_cleanerd/Makefile
+++ b/libexec/lfs_cleanerd/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= lfs_cleanerd
-CFLAGS+=-I/sys/ufs/lfs -I${.CURDIR} -DDIAGNOSTIC
+CFLAGS+=-I/sys/ufs/lfs -I${.CURDIR} ${DEBUG}
MAN8= lfs_cleanerd.8
SRCS= cleanerd.c lfs_cksum.c library.c misc.c print.c
diff --git a/libexec/lfs_cleanerd/clean.h b/libexec/lfs_cleanerd/clean.h
index 0dd8775..5bbece7 100644
--- a/libexec/lfs_cleanerd/clean.h
+++ b/libexec/lfs_cleanerd/clean.h
@@ -63,7 +63,7 @@
#define BUSY_LIM 0.50
#define IDLE_LIM 0.90
-#define MIN_SEGS(lfsp) (3)
+#define MIN_SEGS(lfsp) (5)
#define NUM_TO_CLEAN(fsp) (1)
#define MAXLOADS 3
diff --git a/libexec/lfs_cleanerd/cleanerd.c b/libexec/lfs_cleanerd/cleanerd.c
index 515d2d5..2b8566a 100644
--- a/libexec/lfs_cleanerd/cleanerd.c
+++ b/libexec/lfs_cleanerd/cleanerd.c
@@ -256,15 +256,17 @@ clean_loop(fsp)
perror("getloadavg: failed\n");
return (-1);
}
- if (loadavg[ONE_MIN] == 0.0 && loadavg[FIVE_MIN] &&
+ if (loadavg[ONE_MIN] == 0.2 && loadavg[FIVE_MIN] &&
fsp->fi_cip->clean < max_free_segs * IDLE_LIM) {
clean_fs(fsp, cost_benefit);
- printf("Cleaner Running at %s (system idle)\n",
+ printf("Cleaner running (system idle) at %s",
ctime(&now));
return (1);
}
}
- printf("Cleaner Not Running at %s\n", ctime(&now));
+#ifdef VERBOSE
+ printf("Cleaner not running at %s", ctime(&now));
+#endif
return (0);
}
diff --git a/libexec/lfs_cleanerd/library.c b/libexec/lfs_cleanerd/library.c
index b825a02..19ac0fd 100644
--- a/libexec/lfs_cleanerd/library.c
+++ b/libexec/lfs_cleanerd/library.c
@@ -89,7 +89,7 @@ fs_getmntinfo(buf, name, type)
/* check to see if it's the one we want */
if (((*buf)->f_type != type) ||
strncmp(name, (*buf)->f_mntonname, MNAMELEN)) {
- /* "this is not the filesystem you're looking for */
+ /* "this is not the filesystem you're looking for" */
free(*buf);
return 0;
}
@@ -300,7 +300,7 @@ lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
timestamp = ((SEGSUM*)s)->ss_create;
#ifdef DIAGNOSTIC
- /* Verfiy size of summary block */
+ /* Verify size of summary block */
sumsize = sizeof(SEGSUM) +
(sp->ss_ninos + INOPB(lfsp) - 1) / INOPB(lfsp);
for (fip = (FINFO *)(sp + 1); i < sp->ss_nfinfo; ++i) {
OpenPOWER on IntegriCloud