CrystalDiskInfo
CrystalDiskInfo copied to clipboard
How do I calculate the C5 values of different hard disks from the attribute values of ATA_SMART_INFO?
For example,The specific code is as follows. How to directly calculate the value of SmartC5 through Raw values? /////////////////////////////////////////////////////////////////////////////////////////////////// int i, SMARTC5 = 0; for (i = 0; i < vars.AttributeCount; i++) { if (vars.Attribute[i].Id == 0xC5) break; }
if (vars.DiskVendorId == SSD_VENDOR_SANDFORCE)
{
SMARTC5 =
((UINT64)vars.Attribute[i].Reserved << 48) +
((UINT64)vars.Attribute[i].RawValue[5] << 40) +
((UINT64)vars.Attribute[i].RawValue[4] << 32) +
((UINT64)vars.Attribute[i].RawValue[3] << 24) +
((UINT64)vars.Attribute[i].RawValue[2] << 16) +
((UINT64)vars.Attribute[i].RawValue[1] << 8) +
(UINT64)vars.Attribute[i].RawValue[0];
}
else if (vars.DiskVendorId == SSD_VENDOR_JMICRON && vars.IsRawValues8)
{
SMARTC5 =
((UINT64)vars.Attribute[i].Reserved << 56) +
((UINT64)vars.Attribute[i].RawValue[5] << 48) +
((UINT64)vars.Attribute[i].RawValue[4] << 40) +
((UINT64)vars.Attribute[i].RawValue[3] << 32) +
((UINT64)vars.Attribute[i].RawValue[2] << 24) +
((UINT64)vars.Attribute[i].RawValue[1] << 16) +
((UINT64)vars.Attribute[i].RawValue[0] << 8) +
(UINT64)vars.Attribute[i].WorstValue;
}
.... ///////////////////////////////////////////////////////////////////////////////////////////////////
Try enabling the "10 [DEC]" in Function - Advanced Features - Raw Values, you may get a surprise. You may manually calculate it by like Windows 10 Calculator's Program Mode, but it is cumbersome, not recommended.
Try enabling the "10 [DEC]" in Function - Advanced Features - Raw Values, you may get a surprise. You may manually calculate it by like Windows 10 Calculator's Program Mode, but it is cumbersome, not recommended. Thank you. In general, how is the value of Smart C5 calculated?
Thank you. In general, how is the value of Smart C5 calculated?
I am not sure about the device and format. It is 0 for most normal devices.