From c4f0d9125de38047b3e9352b111459da8700eb7b Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 8 Oct 2019 19:09:10 +0100 Subject: [PATCH] Moved project resource to /app --- lib/system.php | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 lib/system.php 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