/**
  * Checking disk space.
  * @return array
  * @static
  * @final
  */
 public static final function DiskSpace()
 {
     return Tools::FormatSize(@disk_free_space($_SERVER['DOCUMENT_ROOT']) / 1024 / 1024 * 1048576);
 }
Exemple #2
0
 /**
  * Request cache size.
  * @return array|boolean
  * @final
  */
 public final function RequestCacheSize()
 {
     if (is_null($this->db) || empty($this->db)) {
         return false;
     }
     $variables = $this->db->query('SHOW GLOBAL VARIABLES LIKE \'query_cache_size\'');
     return Tools::FormatSize(end($variables->fetch(\PDO::FETCH_NUM)));
 }
Exemple #3
0
 /**
  * The amount of RAM.
  * @return array|boolean
  * @final
  */
 public static final function RAM()
 {
     if (function_exists('exec') == false) {
         return false;
     }
     exec('free -m | grep Mem | awk \'{ print $2 }\'', $memory);
     return Tools::FormatSize(reset($memory) * 1048576);
 }