phodevi: Various fixes

This commit is contained in:
Michael Larabel
2024-01-28 07:59:31 -06:00
parent 331b4722fe
commit 87478458ed
6 changed files with 30 additions and 7 deletions

View File

@@ -343,6 +343,10 @@ class system_monitor extends pts_module_interface
foreach($sensor_list as $sensor)
{
$sensor_split = pts_strings::trim_explode('.', $sensor);
if(!isset($sensor_split[1]))
{
continue;
}
// Set 'all' from the beginning (eg. all.cpu.frequency) as the last
// element (cpu.frequency.all). As sensor parameters are also supported

View File

@@ -904,6 +904,16 @@ class phodevi_cpu extends phodevi_device_interface
break;
}
}
else if($implementer == '0x6d')
{
$new_info = 'Microsoft';
switch($part)
{
case '0xd49':
$new_info .= ' Azure Cobalt 100';
break;
}
}
if(strpos(phodevi::$vfs->dmesg, 'Ampere eMAG') !== false || stripos(pts_file_io::file_get_contents_if_exists('/sys/devices/virtual/dmi/id/sys_vendor'), 'Ampere') !== false || stripos(pts_file_io::file_get_contents_if_exists('/sys/devices/virtual/dmi/id/bios_vendor'), 'Ampere') !== false)
{
@@ -1306,6 +1316,7 @@ class phodevi_cpu extends phodevi_device_interface
97 => 'Zen 4',
112 => 'Zen 4',
116 => 'Zen 4', // Ryzen Z1 Extreme
117 => 'Zen 4',
160 => 'Zen 4',
161 => 'Zen 4',
162 => 'Zen 4',
@@ -1430,6 +1441,7 @@ class phodevi_cpu extends phodevi_device_interface
197 => 'Arrow Lake',
198 => 'Arrow Lake',
207 => 'Emerald Rapids',
221 => 'Clearwater Forest',
),
15 => array(
1 => 'Clarksfield',

View File

@@ -3,8 +3,8 @@
/*
Phoronix Test Suite
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
Copyright (C) 2008 - 2021, Phoronix Media
Copyright (C) 2008 - 2021, Michael Larabel
Copyright (C) 2008 - 2024, Phoronix Media
Copyright (C) 2008 - 2024, Michael Larabel
phodevi_gpu.php: The PTS Device Interface object for the graphics processor
This program is free software; you can redistribute it and/or modify
@@ -1256,8 +1256,15 @@ class phodevi_gpu extends phodevi_device_interface
if(phodevi::is_windows() == false && (empty($info) || (strpos($info, 'Intel ') === false && !pts_strings::string_contains($info, pts_strings::CHAR_NUMERIC))))
{
$controller_3d = phodevi_linux_parser::read_pci('3D controller', false);
$info_pci = phodevi_linux_parser::read_pci('VGA compatible controller', false);
if((empty($info_pci) || strpos($info_pci, ' ') === false) && !empty($controller_3d))
{
// e.g. NVIDIA GH200 is 3D controller while VGA is ASpeed
$info_pci = $controller_3d;
}
if(!empty($info_pci) && strpos($info_pci, 'Device ') === false)
{
$info = $info_pci;

View File

@@ -260,7 +260,7 @@ class phodevi_memory extends phodevi_device_interface
{
$mem_manufacturer = str_ireplace(array(' Technology', ' Intl'), '', $mem_manufacturer);
}
if(isset($mem_manufacturer[2]) && pts_strings::is_alpha($mem_manufacturer[0]) && stripos($mem_manufacturer, 'manufacturer') === false && stripos($mem_manufacturer, 'part') === false && stripos($mem_manufacturer, 'module') === false && stripos($mem_manufacturer, 'dimm') === false && pts_strings::is_alpha(str_replace(' ', '', $mem_manufacturer)))
if(isset($mem_manufacturer[2]) && pts_strings::is_alpha(str_replace('-', '', $mem_manufacturer[0])) && stripos($mem_manufacturer, 'manufacturer') === false && stripos($mem_manufacturer, 'part') === false && stripos($mem_manufacturer, 'module') === false && stripos($mem_manufacturer, 'dimm') === false && pts_strings::is_alpha(str_replace(array(' ', '-'), '', $mem_manufacturer)))
{
$product_string .= ' ' . $mem_manufacturer;
}
@@ -279,11 +279,11 @@ class phodevi_memory extends phodevi_device_interface
{
if($mem_size[0] >= 1024)
{
$mem_size[0] .= ' MB';
$mem_size[0] .= 'MB';
}
else
{
$mem_size[0] .= ' GB';
$mem_size[0] .= 'GB';
}
}

View File

@@ -54,7 +54,7 @@ class phodevi_linux_parser
$value = false;
$ipmitool = shell_exec('ipmitool dcmi power reading 2>&1');
$sensor = "Instantaneous power reading:";
$sensor = 'Instantaneous power reading:';
$hit = stripos($ipmitool, $sensor);
if($hit !== false)

View File

@@ -157,7 +157,7 @@
<set></set>
<default></default>
</xs:appinfo>
<xs:documentation>DivideResultDivisor allows for specifying a divisor for dviding the test result as a multiple.</xs:documentation>
<xs:documentation>DivideResultDivisor allows for specifying a divisor for dividing the test result as a multiple.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MultiplyResultBy" type="PositiveInteger" minOccurs="0" maxOccurs="1">