Fix load average display value, this is not a percentage made out the three values (@see man proc).

This commit is contained in:
Daniel Caujolle-Bert 2017-10-09 08:57:25 +00:00
parent c0d686d5b6
commit 663a661237

View file

@ -195,8 +195,9 @@ if ($_GET['section'] == "sysinfo") {
} }
$output = shell_exec('cat /proc/loadavg'); $output = shell_exec('cat /proc/loadavg');
$sysload = substr($output,0,strpos($output," "))*100; $loadavg = explode(" ", $output);
showLapTime("sysload"); $sysload = $loadavg[0] . " / " . $loadavg[1] . " / " . $loadavg[2];
Showlaptime("sysload");
$stat1 = file('/proc/stat'); $stat1 = file('/proc/stat');
sleep(1); sleep(1);
$stat2 = file('/proc/stat'); $stat2 = file('/proc/stat');
@ -268,7 +269,7 @@ if ($_GET['section'] == "sysinfo") {
<?php <?php
} }
?> ?>
<td><?php echo $sysload; ?> %</td> <td><?php echo $sysload; ?></td>
<td> <td>
<?php <?php
if (defined("SHOWPROGRESSBARS")) { if (defined("SHOWPROGRESSBARS")) {