mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Updated w/ include sysstats
This commit is contained in:
parent
2faf80959d
commit
c3c15d49ad
1 changed files with 1 additions and 34 deletions
|
@ -1,39 +1,6 @@
|
|||
<?php
|
||||
|
||||
$hostname = $system->hostname();
|
||||
$uptime = $system->uptime();
|
||||
$cores = $system->processorCount();
|
||||
|
||||
// mem used
|
||||
$memused = $system->usedMemory();
|
||||
$memused_status = "primary";
|
||||
if ($memused > 90) {
|
||||
$memused_status = "danger";
|
||||
} elseif ($memused > 75) {
|
||||
$memused_status = "warning";
|
||||
} elseif ($memused > 0) {
|
||||
$memused_status = "success";
|
||||
}
|
||||
|
||||
// cpu load
|
||||
$cpuload = $system->systemLoadPercentage();
|
||||
if ($cpuload > 90) {
|
||||
$cpuload_status = "danger";
|
||||
} elseif ($cpuload > 75) {
|
||||
$cpuload_status = "warning";
|
||||
} elseif ($cpuload > 0) {
|
||||
$cpuload_status = "success";
|
||||
}
|
||||
|
||||
// cpu temp
|
||||
$cputemp = $system->systemTemperature();
|
||||
if ($cputemp > 70) {
|
||||
$cputemp_status = "danger";
|
||||
} elseif ($cputemp > 50) {
|
||||
$cputemp_status = "warning";
|
||||
} else {
|
||||
$cputemp_status = "success";
|
||||
}
|
||||
include_once('includes/sysstats.php');
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue