switch to poller.php away from poll-device.php. increase syslog table read speed a bit by using php-side device info cache

git-svn-id: http://www.observium.org/svn/observer/trunk@1255 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-06-23 19:17:06 +00:00
parent f98cf66756
commit a4b9c5dbcb
4 changed files with 236 additions and 308 deletions

View File

@@ -93,10 +93,14 @@ echo("
");
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog,devices WHERE syslog.device_id = devices.device_id ORDER BY seq DESC LIMIT 20";
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from `syslog` ORDER BY seq DESC LIMIT 20";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");
while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
while($entry = mysql_fetch_array($query))
{
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
include("includes/print-syslog.inc");
}
echo("</table>");