diff --git a/lib/system.php b/lib/system.php deleted file mode 100644 index 5e6399ac..00000000 --- a/lib/system.php +++ /dev/null @@ -1,48 +0,0 @@ - 1)? 's ':' '); - } - if ($hours != 0) { - $uptime .= $hours . ' hour' . (($hours > 1)? 's ':' '); - } - if ($minutes != 0) { - $uptime .= $minutes . ' minute' . (($minutes > 1)? 's ':' '); - } - - return $uptime; - } - - public function usedMemory() { - $used = shell_exec("free -m | awk '/Mem:/ { total=$2 ; used=$3 } END { print used/total*100}'"); - return floor($used); - } - - public function processorCount() { - $procs = shell_exec("nproc --all"); - return intval($proc); - } - - public function loadAvg1Min() { - $load = exec("awk '{print $1}' /proc/loadavg"); - return floatval($load); - } - - public function systemLoadPercentage() { - return floor(($this->loadAvg1Min() * 100) / $this->processorCount()); - } -} \ No newline at end of file