1
1
Fork 0

Merge pull request #12316 from VVelox/load_fix

get the load average in a portable manner
This commit is contained in:
Hypolite Petovan 2022-12-03 05:38:55 -05:00 committed by GitHub
commit 82972744a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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/.*averages*: //" | sed "s/,//g"');
}
}