Major updates on the road to 0.7

git-svn-id: http://www.observium.org/svn/observer/trunk@492 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-10-28 13:49:37 +00:00
parent bb969a845a
commit 1f1eda9764
47 changed files with 1034 additions and 1235 deletions
+7 -6
View File
@@ -4,7 +4,7 @@
include("config.php");
include("includes/functions.php");
$start = utime();
$poller_start = utime();
### Observer Device Polling Test
@@ -43,16 +43,17 @@ $device_query = mysql_query("SELECT * FROM `devices` WHERE status = '1' $where O
while ($device = mysql_fetch_array($device_query)) {
echo("\n" . $device['hostname'] ."\n");
$host_rrd = $config['rrd_dir'] . "/" . $device['hostname'];
$where = "WHERE device_id = '" . $device['device_id'] . "' AND deleted = '0'";
include("includes/polling/".$type.".inc.php");
echo("\n"); $devices_polled++;
}
$end = utime(); $run = $end - $start;
$proctime = substr($run, 0, 5);
echo("$devices_polled devices polled in $proctime secs\n");
$poller_end = utime(); $poller_run = $poller_end - $poller_start; $poller_time = substr($poller_run, 0, 5);
$string = $argv[0] . " " . date("F j, Y, G:i") . " - $i devices polled in $poller_time secs";
echo("$string\n");
shell_exec("echo '".$string."' >> /opt/observer/observer.log");
?>