From c77608dbea13bdd4684f5a21e0190122d907f38e Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 12 May 2015 14:34:38 +0200 Subject: [PATCH] minor gui fixes --- util/Makefile.in | 1 + util/daily-report.php | 8 ++++---- webui/model/health/health.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/util/Makefile.in b/util/Makefile.in index 61f24012..2235be45 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -36,6 +36,7 @@ install: $(INSTALL) -m 0755 $(srcdir)/sign.php $(DESTDIR)$(libexecdir)/piler $(INSTALL) -m 0755 $(srcdir)/indexer.delta.sh $(DESTDIR)$(libexecdir)/piler $(INSTALL) -m 0755 $(srcdir)/indexer.main.sh $(DESTDIR)$(libexecdir)/piler + $(INSTALL) -m 0755 $(srcdir)/indexer.attachment.sh $(DESTDIR)$(libexecdir)/piler $(INSTALL) -m 0755 $(srcdir)/import.sh $(DESTDIR)$(libexecdir)/piler $(INSTALL) -m 0755 $(srcdir)/purge.sh $(DESTDIR)$(libexecdir)/piler $(INSTALL) -m 0755 $(srcdir)/postinstall.sh $(DESTDIR)$(libexecdir)/piler diff --git a/util/daily-report.php b/util/daily-report.php index 100c16e0..28390440 100644 --- a/util/daily-report.php +++ b/util/daily-report.php @@ -107,8 +107,8 @@ $mail = new ModelMailMail(); list ($uptime, $cpuload) = $health->uptime(); - $cpuinfo = 100 - (int)file_get_contents(CPUSTAT); - + $x = exec(CPU_USAGE_COMMAND); + $cpuinfo = 100 - (int)$x; list($totalmem, $meminfo, $totalswap, $swapinfo) = $health->meminfo(); $shortdiskinfo = $health->diskinfo(); @@ -124,8 +124,8 @@ $mail = new ModelMailMail(); $averagemessagesizeraw = $averagesqlsizeraw = $averagesphinxsizeraw = $daysleftatcurrentrate = 0; /* these next counters are for projecting space */ - $averagemessagesweekraw = ($processed_emails['last_7_days_size']) / 7; - $averagemessagesmonthraw = ($processed_emails['last_30_days_size']) / 30; + $averagemessagesweekraw = 0; + $averagemessagesmonthraw = 0; if($counters['rcvd'] > 0) { $averagemessagesizeraw = $archivesizeraw / $counters['rcvd']; diff --git a/webui/model/health/health.php b/webui/model/health/health.php index 620c0c0e..459a6418 100644 --- a/webui/model/health/health.php +++ b/webui/model/health/health.php @@ -16,9 +16,9 @@ class ModelHealthHealth extends Model { $ret = $error; $time = 0; + $time_start = microtime(true); if($smtp[0] && $smtp[1] && is_numeric($smtp[1]) && $smtp[1] > 0 && $smtp[1] < 65536) { - $time_start = microtime(true); $s = @fsockopen($smtp[0], $smtp[1]);