mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Display CPU and I/O utilization of the last one, five, and 15 minute periods (load).
This commit is contained in:
+15
@@ -11,6 +11,9 @@
|
||||
$cmd = "echo $((`cat /sys/class/thermal/thermal_zone0/temp | cut -c1-2`))";
|
||||
$output = shell_exec($cmd);
|
||||
$output = str_replace(array("\r\n","\r","\n"),"", $output);
|
||||
|
||||
// Get load
|
||||
$loaddata = sys_getloadavg();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -154,6 +157,18 @@
|
||||
echo '<a href="#"><i class="fa fa-fire" style="color:#3366FF"></i> Temp: ' . $output . '</a>';
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
echo '<a href="#"><i class="fa fa-circle" style="color:';
|
||||
if ($loaddata[0] > 2.0) {
|
||||
echo '#FF0000';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '#3366FF';
|
||||
}
|
||||
echo '""></i> Load: ' . $loaddata[0] . ' ' . $loaddata[1] . ' '. $loaddata[2] . '</a>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
|
||||
Reference in New Issue
Block a user