diff --git a/dashboard/pgs/class.reflector.php b/dashboard/pgs/class.reflector.php index 099599c..9bf1f8c 100755 --- a/dashboard/pgs/class.reflector.php +++ b/dashboard/pgs/class.reflector.php @@ -109,6 +109,18 @@ class xReflector { else { $this->ProcessIDFile = null; $this->ServiceUptime = null; + + exec('/usr/bin/systemctl show --property=ActiveEnterTimestamp xlxd.service', $out, $code); + if ($code == 0) { + if (is_array($out) && count($out) > 0) { + $out = $out[0]; + } + if (is_string($out)) { + $out = explode('=', $out, 2)[1]; + $out = strtotime($out); + $this->ServiceUptime = time() - $out; + } + } } }