diff --git a/front/systeminfo.php b/front/systeminfo.php index 6c446477..0fa8cfe8 100644 --- a/front/systeminfo.php +++ b/front/systeminfo.php @@ -14,7 +14,7 @@ ?> @@ -181,6 +181,43 @@ echo ''; +// Storage ---------------------------------------------------------- +echo '
+
+

Storage

+
+
'; + +$storage_lsblk = shell_exec("lsblk -io NAME,SIZE,TYPE,MOUNTPOINT,MODEL --list | tail -n +2 | awk '{print $1\"#\"$2\"#\"$3\"#\"$4\"#\"$5}'"); +$storage_lsblk_line = explode("\n", $storage_lsblk); +$storage_lsblk_line = array_filter($storage_lsblk_line); + +for ($x = 0; $x < sizeof($storage_lsblk_line); $x++) { + $temp = array(); + $temp = explode("#", $storage_lsblk_line[$x]); + $storage_lsblk_line[$x] = $temp; +} +// echo '
';
+// print_r($storage_lsblk_line);
+// echo '
'; + +for ($x = 0; $x < sizeof($storage_lsblk_line); $x++) { + //if (stristr($hdd_devices[$x], '/dev/')) { + echo '
'; + if (preg_match('~[0-9]+~', $storage_lsblk_line[$x][0])) { + echo '
Mount point "' . $storage_lsblk_line[$x][3] . '"
'; + } else { + echo '
"' . str_replace('_', ' ', $storage_lsblk_line[$x][3]) . '"
'; + } + echo '
Device: /dev/' . $storage_lsblk_line[$x][0] . '
'; + echo '
Size: ' . $storage_lsblk_line[$x][1] . '
'; + echo '
Type: ' . $storage_lsblk_line[$x][2] . '
'; + echo '
'; + //} +} +echo '
+
'; + // Storage usage ---------------------------------------------------------- echo '