Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of Error Correction Type information #176

Merged
merged 3 commits into from
Oct 12, 2017

Conversation

realies
Copy link
Contributor

@realies realies commented Sep 21, 2017

It would be great to start integrating ECC/EDAC support in unRAID, one of the first steps might be to display relevant information from the BIOS/UEFI.

Reducing the dmidecode -t 16 calls to one is preferable, I am not aware if Maximum Capacity and Error Correction Type can be extracted with awk in one go without having to explode the row as done with $cache, otherwise it would be fine.


screen shot 2017-09-22 at 01 32 00

It would be great to start integrating ECC/EDAC support to unRAID, one of the first steps might be the relevant information from the BIOS/UEFI.

It would be good to reduce the `dmidecode -t 16` calls to one, I'm not aware if `Maximum Capacity` and `Error Correction Type` can be extracted with `awk` in one go without having to `explode` the row, otherwise it would be fine.
@eschultz
Copy link
Contributor

eschultz commented Oct 4, 2017

Just a update: I'm enabling EDAC support in the linux kernel

@realies
Copy link
Contributor Author

realies commented Oct 4, 2017

@eschultz, good to know. Is this expected to be available in the next RC? Looking forward to testing this on an ECC enabled X370 platform.

@unraid unraid deleted a comment from limetech Oct 4, 2017
@eschultz
Copy link
Contributor

eschultz commented Oct 4, 2017

@realies We jumped up to kernel 4.13.4 and added EDAC so if the new kernel checks out (i'm sure it will) then it'll all be included in the next RC. Kernel 4.12.x is EOL now.

@bergware
Copy link
Contributor

You can combine both searches in a single awk statement. Like this

list($memory_maximum,$ecc_support) = array_map('trim',explode('#',exec("dmidecode -t16|awk -F: '/^\tMaximum Capacity: [0-9]+ GB$/{t+=$2};/^\tError Correction Type:/{e=$2} END{print t\"#\"e}'")));

And make a single echo statement. Like this

echo "$memory_installed GB ".($ecc_support=='None'?"":"$ecc_support ")."(max. installable capacity $memory_maximum GB)$star";

@realies
Copy link
Contributor Author

realies commented Oct 11, 2017

Since the output of dmidecode is unlikely to change without hardware or BIOS setting changes, it might be optimal to cache dmidecode to a processed file within the ramfs and consult it instead.

// If maximum < installed then roundup maximum to the next power of 2 size of installed. E.g. 6 -> 8 or 12 -> 16
if ($memory_maximum < $memory_installed) {$memory_maximum = pow(2,ceil(log($memory_installed)/log(2))); $star = "*";}
echo "$memory_installed GB (max. installable capacity $memory_maximum GB)$star";
$star = "";
Copy link
Member

@ljm42 ljm42 Oct 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line was meant to initialize $star, it should come before line 145.

@eschultz eschultz merged commit 22410f1 into unraid:6.4-wip Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants