Changeset 39 for trunk/www/server.php


Ignore:
Timestamp:
Jun 16, 2009, 6:11:15 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Zobrazení více informací o serverech včetně počtu účtů, postav a online hráčů, dále pak zabraná paměť a doba běhu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/server.php

    r38 r39  
    137137      $DbRow = $DbResult->fetch_row();
    138138      $State['AccountCount'] = $DbRow[0];
     139      $DbResult = $this->Database->query('SELECT uptime FROM server'.$this->Id.'_realmd.uptime AS T ORDER BY T.startstring DESC');
     140      $DbRow = $DbResult->fetch_assoc();
     141      $State['Uptime'] = $DbRow['uptime'];
    139142    } else
    140143    {
     
    143146      $State['AccountCount'] = 0;
    144147    }
     148    $State['UsedMemory'] = $this->GetUsedMemory();
    145149    return($State);
    146150  }
     
    345349  {
    346350    $Output = array();
    347     exec('ps -aux|grep "emulator/'.$this->Server['Database']['Emulator']['Id'].'/bin/mangos-worldd -c server/'.$this->Id.'/etc/mangosd.conf"| grep -v grep', $Output);
    348     print_r($Output);
     351    if(isset($this->Server['Database']['Emulator']['Id']))
     352      exec('ps -aux|grep "emulator/'.$this->Server['Database']['Emulator']['Id'].'/bin/mangos-worldd -c server/'.$this->Id.'/etc/mangosd.conf"| grep -v grep', $Output);
    349353    if(count($Output) > 0)
    350354    {
Note: See TracChangeset for help on using the changeset viewer.