From: Zane C. Bowers-Hadley Date: Sat, 3 Dec 2022 10:24:49 +0000 (-0600) Subject: get the load average in a portable manner X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f66420815793015db113315f28c4ef1931c304bb;p=friendica.git get the load average in a portable manner --- diff --git a/src/Core/System.php b/src/Core/System.php index b2da78f1b3..dbf49b38db 100644 --- a/src/Core/System.php +++ b/src/Core/System.php @@ -445,7 +445,7 @@ class System if (@is_readable('/proc/loadavg')) { $content = @file_get_contents('/proc/loadavg'); if (empty($content)) { - $content = shell_exec('cat /proc/loadavg'); + $content = shell_exec('uptime | sed "s/.*e: //" | sed "s/,//"'); } }