mirror of
https://codeberg.org/mclemens/tsmmonitor2.git
synced 2024-11-16 15:56:10 -05:00
- Fixed typo with ADODB result set introduced in previous revision.
- For PollD_MP run getServerVersion() only once every polling inter- val, not for every query.
This commit is contained in:
parent
97afaa73a6
commit
414af8a1eb
@ -258,7 +258,7 @@ class ADOdb {
|
||||
$recordArray = array();
|
||||
$this->conn->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||
try {
|
||||
$recordSet = $this->conn->Execute($sql);
|
||||
$recordSet = &$this->conn->Execute($sql);
|
||||
} catch (exception $e) {
|
||||
$this->writeMSG(adodb_backtrace($e->gettrace()));
|
||||
exit;
|
||||
|
@ -695,6 +695,7 @@ class PollD {
|
||||
class PollD_MP {
|
||||
|
||||
var $cfg;
|
||||
var $servers;
|
||||
var $queries;
|
||||
var $lastrun;
|
||||
var $overviewqueries;
|
||||
@ -908,6 +909,7 @@ class PollD_MP {
|
||||
$servers = array();
|
||||
while (list ($key, $val) = each ($rows)) {
|
||||
$servers[$val["servername"]] = (array)$val;
|
||||
$servers[$val["servername"]]["version"] = $this->getServerVersion($val);
|
||||
}
|
||||
return $servers;
|
||||
}
|
||||
@ -1141,7 +1143,7 @@ class PollD_MP {
|
||||
$starttquery = time();
|
||||
$querytime = 0;
|
||||
|
||||
$version = $this->getServerVersion($server["servername"]);
|
||||
$version = $this->servers[$server]["version"];
|
||||
|
||||
$logprefix = "Worker(".$this->child_pid.") ".sprintf('%-16s', $server)." ---------".$query["name"];
|
||||
$tablename = "res_".$query["name"]."_".$server;
|
||||
@ -1214,7 +1216,7 @@ class PollD_MP {
|
||||
$starttquery = time();
|
||||
$querytime = 0;
|
||||
|
||||
$version = $this->getServerVersion($server["servername"]);
|
||||
$version = $this->servers[$server]["version"];
|
||||
|
||||
$tablename = "res_overview_".$server;
|
||||
$logprefix = "Worker(".$this->child_pid.") ".sprintf('%-16s', $server)." ---------".$query["name"];
|
||||
|
Loading…
Reference in New Issue
Block a user