diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-05-08 11:35:04 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-05-08 11:35:04 -0400 |
commit | 62a00acbbd787da5f4f36bd99448202ff8ef7769 (patch) | |
tree | 4689dcaadf3c572c6715b8e03dc9753fcd7613ac /pts-core/functions/pts-functions_system_cpu.php | |
parent | cc8c1e4b3767e52c7a277b4460c9b3760a19e9d9 (diff) | |
download | phoronix-test-suite-upstream-62a00acbbd787da5f4f36bd99448202ff8ef7769.tar.gz phoronix-test-suite-upstream-62a00acbbd787da5f4f36bd99448202ff8ef7769.tar.xz phoronix-test-suite-upstream-62a00acbbd787da5f4f36bd99448202ff8ef7769.zip |
Move generic system parsing functions to
pts-core/functions/pts-functions_system_parsing.php
Diffstat (limited to 'pts-core/functions/pts-functions_system_cpu.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_cpu.php | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pts-core/functions/pts-functions_system_cpu.php b/pts-core/functions/pts-functions_system_cpu.php index 27579fc..b7b792e 100644 --- a/pts-core/functions/pts-functions_system_cpu.php +++ b/pts-core/functions/pts-functions_system_cpu.php @@ -1,30 +1,5 @@ <?php -function read_cpuinfo_values($attribute) -{ - $cpuinfo_matches = array(); - - if(is_file("/proc/cpuinfo")) - { - $cpuinfo_lines = explode("\n", file_get_contents("/proc/cpuinfo")); - - foreach($cpuinfo_lines as $line) - { - $line = explode(": ", $line); - $this_attribute = trim($line[0]); - - if(count($line) > 1) - $this_value = trim($line[1]); - else - $this_value = ""; - - if($this_attribute == $attribute) - array_push($cpuinfo_matches, $this_value); - } - } - - return $cpuinfo_matches; -} function cpu_core_count() { $processors = read_cpuinfo_values("processor"); |