diff --git a/include/disk.php b/include/disk.php new file mode 100644 index 0000000..b5b2277 --- /dev/null +++ b/include/disk.php @@ -0,0 +1,87 @@ +
+ +
Disk use
+ +
+ + + + + + + + + + + + + + + + 'N.A', + 'used' => 'N.A', + 'free' => 'N.A', + 'percent_used' => 0, + 'mount' => 'N.A', + 'filesystem' => 'N.A', + ); +} +else +{ + $mounted_points = array(); + $key = 0; + + foreach ($df as $mounted) + { + list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted); + + if (strpos($type, 'tmpfs') !== false ) + continue; + + +?> + + + + + + + + + + + + + + + +
FilesystemMountUseFreeUsedTotal
%
+
+
+ + diff --git a/include/functions.php b/include/functions.php index 6d90951..1a384c3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -469,6 +469,21 @@ function getActiveYSFReflectors($logLines) { return $reflectorlist; } + + function getSize($filesize, $precision = 2) + { + $units = array('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'); + + foreach ($units as $idUnit => $unit) + { + if ($filesize > 1024) + $filesize /= 1024; + else + break; + } + + return round($filesize, $precision).' '.$units[$idUnit].'B'; + } //Some basic inits $mmdvmconfigs = getMMDVMConfig(); $logLinesMMDVM = getMMDVMLog(); diff --git a/index.php b/index.php index a16861e..a42d720 100644 --- a/index.php +++ b/index.php @@ -53,6 +53,7 @@ if (defined("ENABLEMANAGEMENT")) { checkSetup(); // Here you can feel free to disable info-sections by commenting out with // before include include "include/sysinfo.php"; +include "include/disk.php"; include "include/repeaterinfo.php"; include "include/modes.php"; include "include/lh.php";