summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-07-05 18:02:35 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-03 11:49:19 -0400
commit25749326fc28f51d5e5531d16a923ef1e3a06591 (patch)
treee487aa781c9fcf36258e6ec1ada558a60cc769e1 /pts-core/functions/pts-functions_system.php
parent66dd87c83614bae3938fa06929ade01253685102 (diff)
downloadphoronix-test-suite-upstream-25749326fc28f51d5e5531d16a923ef1e3a06591.tar.gz
phoronix-test-suite-upstream-25749326fc28f51d5e5531d16a923ef1e3a06591.tar.xz
phoronix-test-suite-upstream-25749326fc28f51d5e5531d16a923ef1e3a06591.zip
Add initial support for Solaris / OpenSolaris... A few hardware
detection functions may also be improved as a result.
Diffstat (limited to 'pts-core/functions/pts-functions_system.php')
-rw-r--r--pts-core/functions/pts-functions_system.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php
index 584f0fd..7a4d440 100644
--- a/pts-core/functions/pts-functions_system.php
+++ b/pts-core/functions/pts-functions_system.php
@@ -122,6 +122,12 @@ function memory_mb_capacity()
$info = intval(trim(substr($info, 0, strpos($info, "kB"))));
$info = floor($info / 1024);
}
+ else if(IS_SOLARIS)
+ {
+ $info = shell_exec("prtconf | grep Memory");
+ $info = substr($info, strpos($info, ":") + 2));
+ $info = substr($info, 0, strpos($info, "Megabytes"));
+ }
else
$info = "Unknown";
@@ -187,11 +193,21 @@ function operating_system_release()
$file = file_get_contents($files[0]);
$os = substr($file, 0, strpos($file, "\n"));
}
+ else
+ {
+ if(is_file("/etc/release"))
+ {
+ $file = file_get_contents("/etc/release");
+ $os = substr($file, 0, strpos($file, "\n"));
+ }
+ }
}
}
else
$os = $vendor . " " . $version;
+ $os = trim($os);
+
return $os;
}
function pts_vendor_identifier()