From a8deaddc5ef835add3f6d227154858040fae36ea Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 7 Mar 2017 16:45:22 +0100 Subject: [PATCH] Improve FTL information box on the Settings page --- scripts/pi-hole/php/header.php | 4 +++- settings.php | 30 ++++++++++++------------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 5f8826ae..e08de235 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -140,7 +140,9 @@ } } - if(strpos(exec("ps -p `cat /var/run/pihole-FTL.pid` -o comm="), "pihole-FTL") !== false) + $FTL = false; + $FTLpid = file_get_contents("/var/run/pihole-FTL.pid"); + if (file_exists( "/proc/".$FTLpid )) { $FTL = true; } diff --git a/settings.php b/settings.php index a1ff0652..93613244 100644 --- a/settings.php +++ b/settings.php @@ -802,17 +802,12 @@
@@ -822,14 +817,13 @@ if($FTL)
FTL version:
- Process identifier (PID):
- Time FTL started:
- User / Group: / -
(WARNING: You should not use root as user for running FTL!)
- Total CPU utilization: %
- Total CPU time:
- Memory utilization: %
- Used memory:
+ Process identifier (PID):
+ Time FTL started:
+ User / Group: /
+ Total CPU utilization: %
+ Total CPU time:
+ Memory utilization: %
+ Used memory: