diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-07-05 18:02:35 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-03 11:49:19 -0400 |
commit | 25749326fc28f51d5e5531d16a923ef1e3a06591 (patch) | |
tree | e487aa781c9fcf36258e6ec1ada558a60cc769e1 /pts-core/functions/pts-functions_system.php | |
parent | 66dd87c83614bae3938fa06929ade01253685102 (diff) | |
download | phoronix-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.php | 16 |
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() |