summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_parsing.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-03 08:33:18 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-03 08:33:18 -0500
commitdf022b193d111b37dc8220d93d09c865ba205ee6 (patch)
tree13289eb177ed2b5e75ce1d0a55b9ce3ee0e544b8 /pts-core/functions/pts-functions_system_parsing.php
parent5cfbd53dd3f65a9055ab484b00fda5e2671b5eac (diff)
downloadphoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.tar.gz
phoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.tar.xz
phoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.zip
pts-core: Add support for reading X.Org module / driver versions using
read_xorg_module_version() pts-core: Where applicable, report X.Org DDX driver and version to software information string
Diffstat (limited to 'pts-core/functions/pts-functions_system_parsing.php')
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index 7309e0f..a7fd105 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -617,6 +617,28 @@ function read_hddtemp($disk = null)
return $hdd_temperature;
}
+function read_xorg_module_version($module)
+{
+ $module_version = false;
+ if(is_file("/var/log/Xorg.0.log"))
+ {
+ $xorg_log = @file_get_contents("/var/log/Xorg.0.log");
+
+ if(($module_start = strpos($xorg_log, $module)) > 0)
+ {
+ $xorg_log = substr($xorg_log, $module_start);
+ $temp_version = substr($xorg_log, strpos($xorg_log, "module version =") + 17);
+ $temp_version = substr($temp_version, 0, strpos($temp_version, "\n"));
+
+ if(is_numeric(str_replace(".", "", $temp_version)))
+ {
+ $module_version = $temp_version;
+ }
+ }
+ }
+
+ return $module_version;
+}
function read_osx_system_profiler($data_type, $object, $multiple_objects = false)
{
$info = trim(shell_exec("system_profiler " . $data_type . " 2>&1"));