summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting/inc/remotereport.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics_reporting/inc/remotereport.inc.php')
-rw-r--r--modules-available/statistics_reporting/inc/remotereport.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules-available/statistics_reporting/inc/remotereport.inc.php b/modules-available/statistics_reporting/inc/remotereport.inc.php
index 98f366b6..fec78542 100644
--- a/modules-available/statistics_reporting/inc/remotereport.inc.php
+++ b/modules-available/statistics_reporting/inc/remotereport.inc.php
@@ -106,6 +106,7 @@ class RemoteReport
$cpuInfo = file_get_contents('/proc/cpuinfo');
$uptime = file_get_contents('/proc/uptime');
$memInfo = file_get_contents('/proc/meminfo');
+ $osInfo = parse_ini_file('/etc/os-release');
preg_match_all('/\b(\w+):\s+(\d+)\s/s', $memInfo, $out, PREG_SET_ORDER);
$mem = array();
foreach ($out as $e) {
@@ -126,6 +127,14 @@ class RemoteReport
$data['swapTotal'] = $mem['SwapTotal'];
$data['swapUsed'] = ($mem['SwapTotal'] - $mem['SwapFree']);
}
+
+ $data['ip'] = $_SERVER['SERVER_ADDR'];
+ $data['hostname'] = strtolower(gethostbyaddr($_SERVER['SERVER_ADDR']));
+
+ $data['osID'] = $osInfo['ID'];
+ $data['osVersionID'] = $osInfo['VERSION_ID'];
+ $data['osVersionCodename'] = $osInfo['VERSION_CODENAME'];
+
return $data;
}