mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Merge pull request #12316 from VVelox/load_fix
get the load average in a portable manner
This commit is contained in:
commit
82972744a9
1 changed files with 1 additions and 1 deletions
|
@ -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"');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue