MemoryUsage(); $State['MemoryTotal'] = $this->MemoryTotal(); $State['Uptime'] = $this->SystemUptime(); $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Server`'); $DbRow = $DbResult->fetch_row(); $State['ServerCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Server` WHERE `Online` = 1'); $DbRow = $DbResult->fetch_row(); $State['ServerOnlineCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User`'); $DbRow = $DbResult->fetch_row(); $State['UserCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Emulator`'); $DbRow = $DbResult->fetch_row(); $State['EmulatorCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Backup`'); $DbRow = $DbResult->fetch_row(); $State['BackupCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Task`'); $DbRow = $DbResult->fetch_row(); $State['TaskCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Database`'); $DbRow = $DbResult->fetch_row(); $State['DatabaseCount'] = $DbRow[0]; $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Task` WHERE `State` != 2'); $DbRow = $DbResult->fetch_row(); $State['TaskQueued'] = $DbRow[0]; $State['ServerMaxCount'] = $this->Config['MaxServerCount']; return($State); } }