tbrehm
2010-06-16 e28564dbde4f922a6a8263e3dea32d56b60b5b5b
server/mods-available/monitor_core_module.inc.php
@@ -197,6 +197,7 @@
      /* Calls the single Monitoring steps */
      $this->monitorServer();
      $this->monitorOSVer();
      $this->monitorIspCVer();
      $this->monitorDiskUsage();
      $this->monitorMemUsage();
      $this->monitorCpu();
@@ -313,6 +314,42 @@
   }
   function monitorIspcVer() {
      global $app;
      global $conf;
      /* the id of the server as int */
      $server_id = intval($conf["server_id"]);
      /** The type of the data */
      $type = 'ispc_info';
      /*
        Fetch the data into a array
      */
      $data['name'] = ISPC_APP_TITLE;
      $data['version'] = ISPC_APP_VERSION;
      /* the ISPC-Version has no state. It is, what it is */
      $state = 'no_state';
      /*
        Insert the data into the database
      */
      $sql = "INSERT INTO monitor_data (server_id, type, created, data, state) " .
            "VALUES (".
            $server_id . ", " .
            "'" . $app->dbmaster->quote($type) . "', " .
            time() . ", " .
            "'" . $app->dbmaster->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
      $app->dbmaster->query($sql);
      /* The new data is written, now we can delete the old one */
      $this->_delOldRecords($type, 4);
   }
   function monitorDiskUsage() {
      global $app;
      global $conf;