From 94b57bdef6c532f042ea17352c3f84b723501392 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 09 Jul 2013 11:25:57 -0400
Subject: [PATCH] - Fixed: FS#2881 - Monitor module: Some monitor function are never executed.
---
server/mods-available/monitor_core_module.inc.php | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php
index 917e089..2e66d64 100644
--- a/server/mods-available/monitor_core_module.inc.php
+++ b/server/mods-available/monitor_core_module.inc.php
@@ -37,6 +37,8 @@
var $actions_available = array();
/** The Tools */
private $_tools = null;
+ //** time the script was called
+ private $_run_time = null;
/**
* This function is called during ispconfig installation to determine
@@ -52,11 +54,14 @@
*/
public function onLoad() {
global $app;
-
+
+ //* store the running time
+ $this->_run_time = time();
+
/*
* Do the monitor every n minutes and write the result to the db
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if (($min % $this->interval) == 0) {
$this->_doMonitor();
}
@@ -122,7 +127,7 @@
/*
* This monitoring is expensive, so do it only every 15 minutes
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if ($min % 15 != 0) return;
$app->uses('getconf');
@@ -404,7 +409,7 @@
/*
* This monitoring is expensive, so do it only once an hour
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if ($min != 0)
return;
@@ -493,8 +498,8 @@
/*
* This monitoring is expensive, so do it only once a day
*/
- $min = @date('i');
- $hour = @date('H');
+ $min = @date('i', $this->_run_time);
+ $hour = @date('H', $this->_run_time);
if (!($min == 0 && $hour == 23))
return;
/*
--
Gitblit v1.9.1