mirror of
https://github.com/unraid/webgui.git
synced 2026-01-21 09:00:19 -06:00
Correct system information for systems with >= 1TB of RAM memory
This commit is contained in:
@@ -142,8 +142,8 @@ echo $size;
|
||||
Extract error correction type, if none, do not include additional information in the output
|
||||
If maximum < installed then roundup maximum to the next power of 2 size of installed. E.g. 6 -> 8 or 12 -> 16
|
||||
*/
|
||||
$memory_installed = exec("dmidecode -qt17|awk -F: '/^\tSize: [0-9]+ MB\$/{t+=\$2};/^\tSize: [0-9]+ GB\$/{t+=\$2*1024} END{print t}'");
|
||||
list($memory_maximum,$ecc_support) = array_map('trim',explode('#',exec("dmidecode -qt16|awk -F: '/^\tMaximum Capacity: [0-9]+ GB\$/{t+=\$2*1024};/^\tError Correction Type:/{e=\$2} END{print t\"#\"e}'")));
|
||||
$memory_installed = exec("dmidecode -qt17|awk -F: '/^\tSize: [0-9]+ MB\$/{t+=\$2};/^\tSize: [0-9]+ GB\$/{t+=\$2*1024};/^\tSize: [0-9]+ TB\$/{t+=\$2*1048576} END{print t}'");
|
||||
list($memory_maximum,$ecc_support) = array_map('trim',explode('#',exec("dmidecode -qt16|awk -F: '/^\tMaximum Capacity: [0-9]+ GB\$/{t+=\$2*1024};/^\tMaximum Capacity: [0-9]+ TB\$/{t+=\$2*1048576};/^\tError Correction Type:/{e=\$2} END{print t\"#\"e}'")));
|
||||
if ($memory_installed >= 1024) {
|
||||
$memory_installed = round($memory_installed/1024);
|
||||
$memory_maximum = round($memory_maximum/1024);
|
||||
|
||||
Reference in New Issue
Block a user