예제 #1
0
 /**
  * Returns the status of all standard ZPanel hosting ports and the current server uptime.
  * @author Bobby Allen (ballen@bobbyallen.me)
  * @return type 
  */
 function GetServiceStatus()
 {
     $response_xml = ws_xmws::NewXMLContentSection('portstatus', array('web' => module_controller::getIsWebServerUp() == '' ? 0 : 1, 'ftp' => module_controller::getIsFTPUp() == '' ? 0 : 1, 'pop3' => module_controller::getIsPOP3Up() == '' ? 0 : 1, 'imap' => module_controller::getIsIMAPUp() == '' ? 0 : 1, 'smtp' => module_controller::getIsSMTPUp() == '' ? 0 : 1, 'mysql' => module_controller::getIsMySQLUp() == '' ? 0 : 1));
     $response_xml .= ws_xmws::NewXMLTag('serveruptime', sys_monitoring::ServerUptime());
     $dataobject = new runtime_dataobject();
     $dataobject->addItemValue('response', '');
     $dataobject->addItemValue('content', $response_xml);
     return $dataobject->getDataObject();
 }
예제 #2
0
 /**
  * Returns the status of all standard Sentora hosting ports and the current server uptime.
  * @author Bobby Allen (ballen@bobbyallen.me)
  * @return type 
  */
 function GetServiceStatus()
 {
     $port_status = array();
     foreach (self::$localports as $key => $value) {
         $up = 0;
         if (sys_monitoring::LocalPortStatus($value)) {
             $up = 1;
         }
         $port_status[$key] = $up;
     }
     $response_xml = ws_xmws::NewXMLContentSection('portstatus', $port_status);
     $response_xml .= ws_xmws::NewXMLTag('serveruptime', sys_monitoring::ServerUptime());
     $dataobject = new runtime_dataobject();
     $dataobject->addItemValue('response', '');
     $dataobject->addItemValue('content', $response_xml);
     return $dataobject->getDataObject();
 }
 public static function Template()
 {
     return sys_monitoring::ServerUptime();
 }
예제 #4
0
 static function getUptime()
 {
     return sys_monitoring::ServerUptime();
 }