diff --git a/front/systeminfo.php b/front/systeminfo.php index b65941df..4e00ef9f 100644 --- a/front/systeminfo.php +++ b/front/systeminfo.php @@ -9,7 +9,7 @@ // Puche 2021 pi.alert.application@gmail.com GNU GPLv3 // jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 // leiweibau 2022 https://github.com/leiweibau GNU GPLv3 -// cvc90 2023 https://github.com/cvc90 GNU GPLv3 +// cvc90 2023 https://github.com/cvc90 GNU GPLv3 //------------------------------------------------------------------------------ ?> @@ -92,6 +92,9 @@ $hdd_result = shell_exec("df | awk '{print $5}'"); $hdd_devices_percent = explode("\n", trim($hdd_result)); $hdd_result = shell_exec("df | awk '{print $6}'"); $hdd_devices_mount = explode("\n", trim($hdd_result)); +//usb devices +$usb_result = shell_exec("lsusb"); +$usb_devices_mount = explode("\n", trim($usb_result)); // Client ---------------------------------------------------------- echo '
@@ -200,6 +203,63 @@ for ($x = 0; $x < sizeof($hdd_devices); $x++) { echo '
' . $pia_lang['SysInfo_storage_note']; echo '
'; + +// Services ---------------------------------------------------------- +echo '
+
+

Services (running)

+
+
'; +echo '
'; +exec('systemctl --type=service --state=running', $running_services); +echo ''; +echo ' + + + + + '; +$table_color = 'odd'; +for ($x = 0; $x < sizeof($running_services); $x++) { + if (stristr($running_services[$x], '.service')) { + $temp_services_arr = array_values(array_filter(explode(' ', trim($running_services[$x])))); + $servives_name = $temp_services_arr[0]; + unset($temp_services_arr[0], $temp_services_arr[1], $temp_services_arr[2], $temp_services_arr[3]); + $servives_description = implode(" ", $temp_services_arr); + if ($table_color == 'odd') {$table_color = 'even';} else { $table_color = 'odd';} + + echo ''; + } +} +echo ''; +echo '
'; +echo '
+
'; + +// USB ---------------------------------------------------------- +echo '
+
+

USB Devices

+
+
'; +echo ' '; + +$table_color = 'odd'; +sort($usb_devices_mount); +for ($x = 0; $x < sizeof($usb_devices_mount); $x++) { + $cut_pos = strpos($usb_devices_mount[$x], ':'); + $usb_bus = substr($usb_devices_mount[$x], 0, $cut_pos); + $usb_dev = substr($usb_devices_mount[$x], $cut_pos + 1); + + if ($table_color == 'odd') {$table_color = 'even';} else { $table_color = 'odd';} + echo ''; +} +echo ' '; +echo '
+
'; +echo '
'; + + ?>