summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pts-core/functions/pts-functions-run.php2
-rw-r--r--pts-core/functions/pts-functions.php6
-rw-r--r--pts-core/functions/pts-functions_system.php10
-rw-r--r--pts-core/functions/pts-functions_system_hardware.php39
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php15
-rw-r--r--pts-core/functions/pts-functions_system_software.php2
-rw-r--r--pts-core/modules/system_monitor.php12
7 files changed, 43 insertions, 43 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index c21ecdd..d687dd9 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -226,7 +226,7 @@ function pts_generate_test_notes($test_type)
// Power Saving Technologies?
pts_add_test_note(hw_cpu_power_savings_enabled());
- pts_add_test_note(system_power_mode());
+ pts_add_test_note(hw_sys_power_mode());
pts_add_test_note(system_virtualized_mode());
if($test_type == "Graphics" || $test_type == "System")
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index b464a51..40b791c 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -174,7 +174,7 @@ function pts_env_variables()
"PHP_BIN" => PHP_BIN,
"NUM_CPU_CORES" => hw_cpu_core_count(),
"NUM_CPU_JOBS" => hw_cpu_job_count(),
- "SYS_MEMORY" => memory_mb_capacity(),
+ "SYS_MEMORY" => hw_sys_memory_capacity(),
"VIDEO_MEMORY" => hw_gpu_memory_size(),
"VIDEO_WIDTH" => hw_gpu_screen_width(),
"VIDEO_HEIGHT" => hw_gpu_screen_height(),
@@ -203,8 +203,8 @@ function pts_user_runtime_variables()
"VIDEO_DRIVER" => opengl_version(),
"OPERATING_SYSTEM" => operating_system_release(),
"PROCESSOR" => hw_cpu_string(),
- "MOTHERBOARD" => main_system_hardware_string(),
- "CHIPSET" => motherboard_chipset_string(),
+ "MOTHERBOARD" => hw_sys_motherboard_string(),
+ "CHIPSET" => hw_sys_chipset_string(),
"KERNEL_VERSION" => kernel_string(),
"COMPILER" => compiler_version(),
"HOSTNAME" => system_hostname()
diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php
index 87f1326..f73cd00 100644
--- a/pts-core/functions/pts-functions_system.php
+++ b/pts-core/functions/pts-functions_system.php
@@ -33,10 +33,10 @@ function pts_hw_string()
$hardware = array();
array_push($hardware, "Processor: " . hw_cpu_string() . " (Total Cores: " . hw_cpu_core_count() . ")");
- array_push($hardware, "Motherboard: " . main_system_hardware_string());
- array_push($hardware, "Chipset: " . motherboard_chipset_string());
- array_push($hardware, "System Memory: " . system_memory_string());
- array_push($hardware, "Disk: " . system_hard_disks());
+ array_push($hardware, "Motherboard: " . hw_sys_motherboard_string());
+ array_push($hardware, "Chipset: " . hw_sys_chipset_string());
+ array_push($hardware, "System Memory: " . hw_sys_memory_string());
+ array_push($hardware, "Disk: " . hw_sys_hdd_string());
array_push($hardware, "Graphics: " . hw_gpu_string() . hw_gpu_frequency());
array_push($hardware, "Screen Resolution: " . hw_gpu_current_mode());
@@ -64,7 +64,7 @@ function pts_sw_string()
}
function pts_system_identifier_string()
{
- $components = array(hw_cpu_string(), main_system_hardware_string(), operating_system_release(), compiler_version());
+ $components = array(hw_cpu_string(), hw_sys_motherboard_string(), operating_system_release(), compiler_version());
return base64_encode(implode("__", $components));
}
diff --git a/pts-core/functions/pts-functions_system_hardware.php b/pts-core/functions/pts-functions_system_hardware.php
index 591d985..a7c4cae 100644
--- a/pts-core/functions/pts-functions_system_hardware.php
+++ b/pts-core/functions/pts-functions_system_hardware.php
@@ -21,7 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-function main_system_hardware_string()
+function hw_sys_motherboard_string()
{
// Returns the motherboard / system model name or number
$info = "";
@@ -87,7 +87,7 @@ function main_system_hardware_string()
return pts_clean_information_string($info);
}
-function motherboard_chipset_string()
+function hw_sys_chipset_string()
{
// Returns motherboard chipset
if(IS_MACOSX)
@@ -157,7 +157,7 @@ function motherboard_chipset_string()
return $info;
}
-function system_hard_disks()
+function hw_sys_hdd_string()
{
$disks = array();
if(IS_MACOSX)
@@ -297,7 +297,7 @@ function system_hard_disks()
if(count($disks) == 0)
{
- $disks = system_disk_total() . "GB";
+ $disks = hw_sys_hdd_total() . "GB";
}
else
{
@@ -306,12 +306,12 @@ function system_hard_disks()
return $disks;
}
-function system_disk_total()
+function hw_sys_hdd_total()
{
// Returns amoung of disk space
return ceil(disk_total_space("/") / 1073741824);
}
-function system_memory_string()
+function hw_sys_memory_string()
{
$mem_string = null;
@@ -377,12 +377,12 @@ function system_memory_string()
if(empty($mem_string))
{
- $mem_string = memory_mb_capacity() . "MB";
+ $mem_string = hw_sys_memory_capacity() . "MB";
}
return trim($mem_string);
}
-function memory_mb_capacity()
+function hw_sys_memory_capacity()
{
// Returns physical memory capacity
if(is_file("/proc/meminfo"))
@@ -430,7 +430,7 @@ function memory_mb_capacity()
return $info;
}
-function system_temperature()
+function hw_sys_temperature()
{
// Reads the system's temperature
$temp_c = read_sensors(array("Sys Temp", "Board Temp"));
@@ -452,7 +452,7 @@ function system_temperature()
return $temp_c;
}
-function system_line_voltage($type)
+function hw_sys_line_voltage($type)
{
// Reads the system's line voltages
if($type == "CPU")
@@ -483,12 +483,12 @@ function system_line_voltage($type)
return $voltage;
}
-function system_hdd_temperature($disk = null)
+function hw_sys_hdd_temperature($disk = null)
{
// Attempt to read temperature using hddtemp
return read_hddtemp($disk);
}
-function system_power_mode()
+function hw_sys_power_mode()
{
// Returns the power mode
$power_state = read_acpi("/ac_adapter/AC/state", "state");
@@ -501,20 +501,5 @@ function system_power_mode()
return $return_status;
}
-function read_physical_memory_usage()
-{
- // Amount of physical memory being used
- return read_system_memory_usage("MEMORY");
-}
-function read_total_memory_usage()
-{
- // Amount of total (physical + SWAP) memory being used
- return read_system_memory_usage("TOTAL");
-}
-function read_swap_usage()
-{
- // Amount of SWAP memory being used
- return read_system_memory_usage("SWAP");
-}
?>
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index e0c4aff..c99560e 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -688,6 +688,21 @@ function read_osx_system_profiler($data_type, $object, $multiple_objects = false
return $value;
}
+function read_physical_memory_usage()
+{
+ // Amount of physical memory being used
+ return read_system_memory_usage("MEMORY");
+}
+function read_total_memory_usage()
+{
+ // Amount of total (physical + SWAP) memory being used
+ return read_system_memory_usage("TOTAL");
+}
+function read_swap_usage()
+{
+ // Amount of SWAP memory being used
+ return read_system_memory_usage("SWAP");
+}
function read_dmidecode($type, $sub_type, $object, $find_once = false, $ignore = null)
{
// Read Linux dmidecode
diff --git a/pts-core/functions/pts-functions_system_software.php b/pts-core/functions/pts-functions_system_software.php
index f3c6a16..b1518bf 100644
--- a/pts-core/functions/pts-functions_system_software.php
+++ b/pts-core/functions/pts-functions_system_software.php
@@ -35,7 +35,7 @@ function system_virtualized_mode()
{
$virtualized = "VMware";
}
- else if(strpos($gpu, "VirtualBox") !== false || strpos(main_system_hardware_string(), "VirtualBox") !== false)
+ else if(strpos($gpu, "VirtualBox") !== false || strpos(hw_sys_motherboard_string(), "VirtualBox") !== false)
{
$virtualized = "VirtualBox";
}
diff --git a/pts-core/modules/system_monitor.php b/pts-core/modules/system_monitor.php
index 2ae4eb3..394210f 100644
--- a/pts-core/modules/system_monitor.php
+++ b/pts-core/modules/system_monitor.php
@@ -509,14 +509,14 @@ class system_monitor extends pts_module_interface
}
if(pts_is_assignment("MONITOR_HDD_TEMP"))
{
- $temp = system_hdd_temperature();
+ $temp = hw_sys_hdd_temperature();
if($temp != -1)
pts_module::save_file(".s/HDD_TEMPERATURE", $temp, true);
}
if(pts_is_assignment("MONITOR_SYS_TEMP"))
{
- $temp = system_temperature();
+ $temp = hw_sys_temperature();
if($temp != -1)
pts_module::save_file(".s/SYS_TEMPERATURE", $temp, true);
@@ -537,28 +537,28 @@ class system_monitor extends pts_module_interface
}
if(pts_is_assignment("MONITOR_CPU_VOLTAGE"))
{
- $voltage = system_line_voltage("CPU");
+ $voltage = hw_sys_line_voltage("CPU");
if($voltage != -1)
pts_module::save_file(".s/GPU_VOLTAGE", $voltage, true);
}
if(pts_is_assignment("MONITOR_V3_VOLTAGE"))
{
- $voltage = system_line_voltage("V3");
+ $voltage = hw_sys_line_voltage("V3");
if($voltage != -1)
pts_module::save_file(".s/V3_VOLTAGE", $voltage, true);
}
if(pts_is_assignment("MONITOR_V5_VOLTAGE"))
{
- $voltage = system_line_voltage("V5");
+ $voltage = hw_sys_line_voltage("V5");
if($voltage != -1)
pts_module::save_file(".s/V5_VOLTAGE", $voltage, true);
}
if(pts_is_assignment("MONITOR_V12_VOLTAGE"))
{
- $voltage = system_line_voltage("V12");
+ $voltage = hw_sys_line_voltage("V12");
if($voltage != -1)
pts_module::save_file(".s/V12_VOLTAGE", $voltage, true);