Added SMART support for Samsung SSDs.
This commit is contained in:
@@ -54,6 +54,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
typeof(SSDIntel),
|
||||
typeof(SSDSandforce),
|
||||
typeof(SSDIndilinx),
|
||||
typeof(SSDSamsung),
|
||||
typeof(GenericHarddisk)
|
||||
};
|
||||
|
||||
@@ -233,7 +234,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
r.AppendFormat(CultureInfo.InvariantCulture,
|
||||
" {0}{1}{2}{3}{4}{5}{6}{7}",
|
||||
("ID").PadRight(3),
|
||||
("Description").PadRight(32),
|
||||
("Description").PadRight(35),
|
||||
("Raw Value").PadRight(13),
|
||||
("Worst").PadRight(6),
|
||||
("Value").PadRight(6),
|
||||
@@ -268,7 +269,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
r.AppendFormat(CultureInfo.InvariantCulture,
|
||||
" {0}{1}{2}{3}{4}{5}{6}{7}",
|
||||
value.Identifier.ToString("X2").PadRight(3),
|
||||
description.PadRight(32),
|
||||
description.PadRight(35),
|
||||
raw.Replace("-", "").PadRight(13),
|
||||
value.WorstValue.ToString(CultureInfo.InvariantCulture).PadRight(6),
|
||||
value.AttrValue.ToString(CultureInfo.InvariantCulture).PadRight(6),
|
||||
|
||||
+32
-10
@@ -46,7 +46,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
internal class DebugSmart : ISmart {
|
||||
|
||||
private Drive[] drives = {
|
||||
new Drive("KINGSTON SNV425S264GB", 16,
|
||||
new Drive("KINGSTON SNV425S264GB", null, 16,
|
||||
@" 01 000000000000 100 100
|
||||
02 000000000000 100 100
|
||||
03 000000000000 100 100
|
||||
@@ -65,7 +65,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
AA 07007B000000 100 100
|
||||
AD 0E1E71304919 100 100"),
|
||||
|
||||
new Drive("PLEXTOR PX-128M2S", 16,
|
||||
new Drive("PLEXTOR PX-128M2S", "1.03", 16,
|
||||
@" 01 000000000000 100 100 0
|
||||
03 000000000000 100 100 0
|
||||
04 000000000000 100 100 0
|
||||
@@ -84,7 +84,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
C6 000000000000 100 100 0
|
||||
C7 000000000000 100 100 0"),
|
||||
|
||||
new Drive("OCZ-VERTEX2", 16,
|
||||
new Drive("OCZ-VERTEX2", "1.25", 16,
|
||||
@" 01 DADAD5000000 100 106 50
|
||||
05 000000000000 100 100 3
|
||||
09 DF0900004A2F 100 100 0
|
||||
@@ -105,7 +105,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
F1 000600000000 0 0 0
|
||||
F2 801200000000 0 0 0"),
|
||||
|
||||
new Drive("WDC WD5000AADS-00S9B0", 10,
|
||||
new Drive("WDC WD5000AADS-00S9B0", null, 10,
|
||||
@" 1 000000000000 200 200
|
||||
3 820D00000000 149 150
|
||||
4 610800000000 98 98
|
||||
@@ -127,7 +127,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
5 000000000000 0 0
|
||||
1 000000000000 0 0"),
|
||||
|
||||
new Drive("INTEL SSDSA2M080G2GC", 10,
|
||||
new Drive("INTEL SSDSA2M080G2GC", null, 10,
|
||||
@" 3 000000000000 100 100
|
||||
4 000000000000 100 100
|
||||
5 010000000000 100 100
|
||||
@@ -143,7 +143,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
184 000000000000 100 100
|
||||
1 000000000000 0 0"),
|
||||
|
||||
new Drive("OCZ-VERTEX", 10,
|
||||
new Drive("OCZ-VERTEX", null, 10,
|
||||
@" 1 000000000000 0 8
|
||||
9 000000000000 30 99
|
||||
12 000000000000 0 15
|
||||
@@ -167,7 +167,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
212 000000000000 0 0
|
||||
213 000000000000 0 0"),
|
||||
|
||||
new Drive("INTEL SSDSA2CW120G3", 16,
|
||||
new Drive("INTEL SSDSA2CW120G3", null, 16,
|
||||
@"03 000000000000 100 100 0
|
||||
04 000000000000 100 100 0
|
||||
05 000000000000 100 100 0
|
||||
@@ -186,7 +186,26 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
E8 000000000000 100 100 0
|
||||
E9 000000000000 100 100 0
|
||||
F1 FF4300000000 100 100 0
|
||||
F2 264F00000000 100 100 0")
|
||||
F2 264F00000000 100 100 0"),
|
||||
|
||||
new Drive("CORSAIR CMFSSD-128GBG2D", "VBM19C1Q", 16,
|
||||
@"09 100900000000 99 99 0
|
||||
0C 560200000000 99 99 0
|
||||
AF 000000000000 100 100 10
|
||||
B0 000000000000 100 100 10
|
||||
B1 2A0000000000 99 99 17
|
||||
B2 180000000000 60 60 10
|
||||
B3 4B0000000000 98 98 10
|
||||
B4 B50E00000000 98 98 10
|
||||
B5 000000000000 100 100 10
|
||||
B6 000000000000 100 100 10
|
||||
B7 000000000000 100 100 10
|
||||
BB 000000000000 100 100 0
|
||||
C3 000000000000 200 200 0
|
||||
C6 000000000000 100 100 0
|
||||
C7 810100000000 253 253 0
|
||||
E8 240000000000 60 60 10
|
||||
E9 630594120000 92 92 0")
|
||||
};
|
||||
|
||||
public IntPtr OpenDrive(int driveNumber) {
|
||||
@@ -225,7 +244,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
throw new ArgumentOutOfRangeException();
|
||||
|
||||
name = drives[driveNumber].Name;
|
||||
firmwareRevision = "";
|
||||
firmwareRevision = drives[driveNumber].FirmwareVersion;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -234,8 +253,9 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
|
||||
private class Drive {
|
||||
|
||||
public Drive(string name, int idBase, string value) {
|
||||
public Drive(string name, string firmware, int idBase, string value) {
|
||||
this.Name = name;
|
||||
this.FirmwareVersion = firmware;
|
||||
|
||||
string[] lines = value.Split(new[] { '\r', '\n' },
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
@@ -280,6 +300,8 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
public DriveThresholdValue[] DriveThresholdValues { get; private set; }
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public string FirmwareVersion { get; private set; }
|
||||
}
|
||||
|
||||
public IntPtr InvalidHandle { get { return (IntPtr)(-1); } }
|
||||
|
||||
+62
-62
@@ -48,71 +48,71 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
|
||||
private static readonly List<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
new SmartAttribute(0x01, SmartAttributeNames.ReadErrorRate),
|
||||
new SmartAttribute(0x02, SmartAttributeNames.ThroughputPerformance),
|
||||
new SmartAttribute(0x03, SmartAttributeNames.SpinUpTime),
|
||||
new SmartAttribute(0x04, SmartAttributeNames.StartStopCount, RawToInt),
|
||||
new SmartAttribute(0x05, SmartAttributeNames.ReallocatedSectorsCount),
|
||||
new SmartAttribute(0x06, SmartAttributeNames.ReadChannelMargin),
|
||||
new SmartAttribute(0x07, SmartAttributeNames.SeekErrorRate),
|
||||
new SmartAttribute(0x08, SmartAttributeNames.SeekTimePerformance),
|
||||
new SmartAttribute(0x09, SmartAttributeNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0A, SmartAttributeNames.SpinRetryCount),
|
||||
new SmartAttribute(0x0B, SmartAttributeNames.RecalibrationRetries),
|
||||
new SmartAttribute(0x0C, SmartAttributeNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0x0D, SmartAttributeNames.SoftReadErrorRate),
|
||||
new SmartAttribute(0xAA, SmartAttributeNames.Unknown),
|
||||
new SmartAttribute(0xAB, SmartAttributeNames.Unknown),
|
||||
new SmartAttribute(0xAC, SmartAttributeNames.Unknown),
|
||||
new SmartAttribute(0xB7, SmartAttributeNames.SataDownshiftErrorCount),
|
||||
new SmartAttribute(0xB8, SmartAttributeNames.EndToEndError),
|
||||
new SmartAttribute(0xB9, SmartAttributeNames.HeadStability),
|
||||
new SmartAttribute(0xBA, SmartAttributeNames.InducedOpVibrationDetection),
|
||||
new SmartAttribute(0xBB, SmartAttributeNames.ReportedUncorrectableErrors),
|
||||
new SmartAttribute(0xBC, SmartAttributeNames.CommandTimeout),
|
||||
new SmartAttribute(0xBD, SmartAttributeNames.HighFlyWrites),
|
||||
new SmartAttribute(0xBF, SmartAttributeNames.GSenseErrorRate),
|
||||
new SmartAttribute(0xC0, SmartAttributeNames.EmergencyRetractCycleCount),
|
||||
new SmartAttribute(0xC1, SmartAttributeNames.LoadCycleCount),
|
||||
new SmartAttribute(0xC3, SmartAttributeNames.HardwareEccRecovered),
|
||||
new SmartAttribute(0xC4, SmartAttributeNames.ReallocationEventCount),
|
||||
new SmartAttribute(0xC5, SmartAttributeNames.CurrentPendingSectorCount),
|
||||
new SmartAttribute(0xC6, SmartAttributeNames.UncorrectableSectorCount),
|
||||
new SmartAttribute(0xC7, SmartAttributeNames.UltraDmaCrcErrorCount),
|
||||
new SmartAttribute(0xC8, SmartAttributeNames.WriteErrorRate),
|
||||
new SmartAttribute(0xCA, SmartAttributeNames.DataAddressMarkErrors),
|
||||
new SmartAttribute(0xCB, SmartAttributeNames.RunOutCancel),
|
||||
new SmartAttribute(0xCC, SmartAttributeNames.SoftEccCorrection),
|
||||
new SmartAttribute(0xCD, SmartAttributeNames.ThermalAsperityRate),
|
||||
new SmartAttribute(0xCE, SmartAttributeNames.FlyingHeight),
|
||||
new SmartAttribute(0xCF, SmartAttributeNames.SpinHighCurrent),
|
||||
new SmartAttribute(0xD0, SmartAttributeNames.SpinBuzz),
|
||||
new SmartAttribute(0xD1, SmartAttributeNames.OfflineSeekPerformance),
|
||||
new SmartAttribute(0xD3, SmartAttributeNames.VibrationDuringWrite),
|
||||
new SmartAttribute(0xD4, SmartAttributeNames.ShockDuringWrite),
|
||||
new SmartAttribute(0xDC, SmartAttributeNames.DiskShift),
|
||||
new SmartAttribute(0xDD, SmartAttributeNames.AlternativeGSenseErrorRate),
|
||||
new SmartAttribute(0xDE, SmartAttributeNames.LoadedHours),
|
||||
new SmartAttribute(0xDF, SmartAttributeNames.LoadUnloadRetryCount),
|
||||
new SmartAttribute(0xE0, SmartAttributeNames.LoadFriction),
|
||||
new SmartAttribute(0xE1, SmartAttributeNames.LoadUnloadCycleCount),
|
||||
new SmartAttribute(0xE2, SmartAttributeNames.LoadInTime),
|
||||
new SmartAttribute(0xE3, SmartAttributeNames.TorqueAmplificationCount),
|
||||
new SmartAttribute(0xE4, SmartAttributeNames.PowerOffRetractCycle),
|
||||
new SmartAttribute(0xE6, SmartAttributeNames.GmrHeadAmplitude),
|
||||
new SmartAttribute(0xE8, SmartAttributeNames.EnduranceRemaining),
|
||||
new SmartAttribute(0xE9, SmartAttributeNames.PowerOnHours),
|
||||
new SmartAttribute(0xF0, SmartAttributeNames.HeadFlyingHours),
|
||||
new SmartAttribute(0xF1, SmartAttributeNames.TotalLbasWritten),
|
||||
new SmartAttribute(0xF2, SmartAttributeNames.TotalLbasRead),
|
||||
new SmartAttribute(0xFA, SmartAttributeNames.ReadErrorRetryRate),
|
||||
new SmartAttribute(0xFE, SmartAttributeNames.FreeFallProtection),
|
||||
new SmartAttribute(0x01, SmartNames.ReadErrorRate),
|
||||
new SmartAttribute(0x02, SmartNames.ThroughputPerformance),
|
||||
new SmartAttribute(0x03, SmartNames.SpinUpTime),
|
||||
new SmartAttribute(0x04, SmartNames.StartStopCount, RawToInt),
|
||||
new SmartAttribute(0x05, SmartNames.ReallocatedSectorsCount),
|
||||
new SmartAttribute(0x06, SmartNames.ReadChannelMargin),
|
||||
new SmartAttribute(0x07, SmartNames.SeekErrorRate),
|
||||
new SmartAttribute(0x08, SmartNames.SeekTimePerformance),
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0A, SmartNames.SpinRetryCount),
|
||||
new SmartAttribute(0x0B, SmartNames.RecalibrationRetries),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0x0D, SmartNames.SoftReadErrorRate),
|
||||
new SmartAttribute(0xAA, SmartNames.Unknown),
|
||||
new SmartAttribute(0xAB, SmartNames.Unknown),
|
||||
new SmartAttribute(0xAC, SmartNames.Unknown),
|
||||
new SmartAttribute(0xB7, SmartNames.SataDownshiftErrorCount),
|
||||
new SmartAttribute(0xB8, SmartNames.EndToEndError),
|
||||
new SmartAttribute(0xB9, SmartNames.HeadStability),
|
||||
new SmartAttribute(0xBA, SmartNames.InducedOpVibrationDetection),
|
||||
new SmartAttribute(0xBB, SmartNames.ReportedUncorrectableErrors),
|
||||
new SmartAttribute(0xBC, SmartNames.CommandTimeout),
|
||||
new SmartAttribute(0xBD, SmartNames.HighFlyWrites),
|
||||
new SmartAttribute(0xBF, SmartNames.GSenseErrorRate),
|
||||
new SmartAttribute(0xC0, SmartNames.EmergencyRetractCycleCount),
|
||||
new SmartAttribute(0xC1, SmartNames.LoadCycleCount),
|
||||
new SmartAttribute(0xC3, SmartNames.HardwareEccRecovered),
|
||||
new SmartAttribute(0xC4, SmartNames.ReallocationEventCount),
|
||||
new SmartAttribute(0xC5, SmartNames.CurrentPendingSectorCount),
|
||||
new SmartAttribute(0xC6, SmartNames.UncorrectableSectorCount),
|
||||
new SmartAttribute(0xC7, SmartNames.UltraDmaCrcErrorCount),
|
||||
new SmartAttribute(0xC8, SmartNames.WriteErrorRate),
|
||||
new SmartAttribute(0xCA, SmartNames.DataAddressMarkErrors),
|
||||
new SmartAttribute(0xCB, SmartNames.RunOutCancel),
|
||||
new SmartAttribute(0xCC, SmartNames.SoftEccCorrection),
|
||||
new SmartAttribute(0xCD, SmartNames.ThermalAsperityRate),
|
||||
new SmartAttribute(0xCE, SmartNames.FlyingHeight),
|
||||
new SmartAttribute(0xCF, SmartNames.SpinHighCurrent),
|
||||
new SmartAttribute(0xD0, SmartNames.SpinBuzz),
|
||||
new SmartAttribute(0xD1, SmartNames.OfflineSeekPerformance),
|
||||
new SmartAttribute(0xD3, SmartNames.VibrationDuringWrite),
|
||||
new SmartAttribute(0xD4, SmartNames.ShockDuringWrite),
|
||||
new SmartAttribute(0xDC, SmartNames.DiskShift),
|
||||
new SmartAttribute(0xDD, SmartNames.AlternativeGSenseErrorRate),
|
||||
new SmartAttribute(0xDE, SmartNames.LoadedHours),
|
||||
new SmartAttribute(0xDF, SmartNames.LoadUnloadRetryCount),
|
||||
new SmartAttribute(0xE0, SmartNames.LoadFriction),
|
||||
new SmartAttribute(0xE1, SmartNames.LoadUnloadCycleCount),
|
||||
new SmartAttribute(0xE2, SmartNames.LoadInTime),
|
||||
new SmartAttribute(0xE3, SmartNames.TorqueAmplificationCount),
|
||||
new SmartAttribute(0xE4, SmartNames.PowerOffRetractCycle),
|
||||
new SmartAttribute(0xE6, SmartNames.GmrHeadAmplitude),
|
||||
new SmartAttribute(0xE8, SmartNames.EnduranceRemaining),
|
||||
new SmartAttribute(0xE9, SmartNames.PowerOnHours),
|
||||
new SmartAttribute(0xF0, SmartNames.HeadFlyingHours),
|
||||
new SmartAttribute(0xF1, SmartNames.TotalLbasWritten),
|
||||
new SmartAttribute(0xF2, SmartNames.TotalLbasRead),
|
||||
new SmartAttribute(0xFA, SmartNames.ReadErrorRetryRate),
|
||||
new SmartAttribute(0xFE, SmartNames.FreeFallProtection),
|
||||
|
||||
new SmartAttribute(0xC2, SmartAttributeNames.Temperature,
|
||||
new SmartAttribute(0xC2, SmartNames.Temperature,
|
||||
(byte[] r, byte v) => { return r[0]; }, SensorType.Temperature, 0),
|
||||
new SmartAttribute(0xE7, SmartAttributeNames.Temperature,
|
||||
new SmartAttribute(0xE7, SmartNames.Temperature,
|
||||
(byte[] r, byte v) => { return r[0]; }, SensorType.Temperature, 0),
|
||||
new SmartAttribute(0xBE, SmartAttributeNames.TemperatureDifferenceFrom100,
|
||||
new SmartAttribute(0xBE, SmartNames.TemperatureDifferenceFrom100,
|
||||
null, SensorType.Temperature, 0)
|
||||
};
|
||||
|
||||
|
||||
+19
-19
@@ -46,26 +46,26 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
|
||||
new SmartAttribute(0xB8, SmartAttributeNames.InitialBadBlockCount),
|
||||
new SmartAttribute(0xC3, SmartAttributeNames.ProgramFailure),
|
||||
new SmartAttribute(0xC4, SmartAttributeNames.EraseFailure),
|
||||
new SmartAttribute(0xC5, SmartAttributeNames.ReadFailure),
|
||||
new SmartAttribute(0xC6, SmartAttributeNames.SectorsRead),
|
||||
new SmartAttribute(0xC7, SmartAttributeNames.SectorsWritten),
|
||||
new SmartAttribute(0xC8, SmartAttributeNames.ReadCommands),
|
||||
new SmartAttribute(0xC9, SmartAttributeNames.WriteCommands),
|
||||
new SmartAttribute(0xCA, SmartAttributeNames.BitErrors),
|
||||
new SmartAttribute(0xCB, SmartAttributeNames.CorrectedErrors),
|
||||
new SmartAttribute(0xCC, SmartAttributeNames.BadBlockFullFlag),
|
||||
new SmartAttribute(0xCD, SmartAttributeNames.MaxCellCycles),
|
||||
new SmartAttribute(0xCE, SmartAttributeNames.MinErase),
|
||||
new SmartAttribute(0xCF, SmartAttributeNames.MaxErase),
|
||||
new SmartAttribute(0xD0, SmartAttributeNames.AverageEraseCount),
|
||||
new SmartAttribute(0xD1, SmartAttributeNames.RemainingLife,
|
||||
new SmartAttribute(0xB8, SmartNames.InitialBadBlockCount),
|
||||
new SmartAttribute(0xC3, SmartNames.ProgramFailure),
|
||||
new SmartAttribute(0xC4, SmartNames.EraseFailure),
|
||||
new SmartAttribute(0xC5, SmartNames.ReadFailure),
|
||||
new SmartAttribute(0xC6, SmartNames.SectorsRead),
|
||||
new SmartAttribute(0xC7, SmartNames.SectorsWritten),
|
||||
new SmartAttribute(0xC8, SmartNames.ReadCommands),
|
||||
new SmartAttribute(0xC9, SmartNames.WriteCommands),
|
||||
new SmartAttribute(0xCA, SmartNames.BitErrors),
|
||||
new SmartAttribute(0xCB, SmartNames.CorrectedErrors),
|
||||
new SmartAttribute(0xCC, SmartNames.BadBlockFullFlag),
|
||||
new SmartAttribute(0xCD, SmartNames.MaxCellCycles),
|
||||
new SmartAttribute(0xCE, SmartNames.MinErase),
|
||||
new SmartAttribute(0xCF, SmartNames.MaxErase),
|
||||
new SmartAttribute(0xD0, SmartNames.AverageEraseCount),
|
||||
new SmartAttribute(0xD1, SmartNames.RemainingLife,
|
||||
null, SensorType.Level, 0),
|
||||
new SmartAttribute(0xD2, SmartAttributeNames.UnknownUnique),
|
||||
new SmartAttribute(0xD3, SmartAttributeNames.SataErrorCountCrc),
|
||||
new SmartAttribute(0xD4, SmartAttributeNames.SataErrorCountHandshake),
|
||||
new SmartAttribute(0xD2, SmartNames.UnknownUnique),
|
||||
new SmartAttribute(0xD3, SmartNames.SataErrorCountCrc),
|
||||
new SmartAttribute(0xD4, SmartNames.SataErrorCountHandshake),
|
||||
};
|
||||
|
||||
public SSDIndilinx(ISmart smart, string name, string firmwareRevision,
|
||||
|
||||
+16
-16
@@ -47,27 +47,27 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
|
||||
new SmartAttribute(0x01, SmartAttributeNames.ReadErrorRate),
|
||||
new SmartAttribute(0x03, SmartAttributeNames.SpinUpTime),
|
||||
new SmartAttribute(0x04, SmartAttributeNames.StartStopCount, RawToInt),
|
||||
new SmartAttribute(0x05, SmartAttributeNames.ReallocatedSectorsCount),
|
||||
new SmartAttribute(0x09, SmartAttributeNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartAttributeNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xAA, SmartAttributeNames.AvailableReservedSpace),
|
||||
new SmartAttribute(0xAB, SmartAttributeNames.ProgramFailCount),
|
||||
new SmartAttribute(0xAC, SmartAttributeNames.EraseFailCount),
|
||||
new SmartAttribute(0xB8, SmartAttributeNames.EndToEndError),
|
||||
new SmartAttribute(0xC0, SmartAttributeNames.UnsafeShutdownCount),
|
||||
new SmartAttribute(0xE1, SmartAttributeNames.HostWrites,
|
||||
new SmartAttribute(0x01, SmartNames.ReadErrorRate),
|
||||
new SmartAttribute(0x03, SmartNames.SpinUpTime),
|
||||
new SmartAttribute(0x04, SmartNames.StartStopCount, RawToInt),
|
||||
new SmartAttribute(0x05, SmartNames.ReallocatedSectorsCount),
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xAA, SmartNames.AvailableReservedSpace),
|
||||
new SmartAttribute(0xAB, SmartNames.ProgramFailCount),
|
||||
new SmartAttribute(0xAC, SmartNames.EraseFailCount),
|
||||
new SmartAttribute(0xB8, SmartNames.EndToEndError),
|
||||
new SmartAttribute(0xC0, SmartNames.UnsafeShutdownCount),
|
||||
new SmartAttribute(0xE1, SmartNames.HostWrites,
|
||||
(byte[] r, byte v) => { return RawToInt(r, v) / 0x20; },
|
||||
SensorType.Data, 0),
|
||||
new SmartAttribute(0xE8, SmartAttributeNames.RemainingLife,
|
||||
new SmartAttribute(0xE8, SmartNames.RemainingLife,
|
||||
null, SensorType.Level, 0),
|
||||
new SmartAttribute(0xE9, SmartAttributeNames.MediaWearOutIndicator),
|
||||
new SmartAttribute(0xF1, SmartAttributeNames.HostWrites,
|
||||
new SmartAttribute(0xE9, SmartNames.MediaWearOutIndicator),
|
||||
new SmartAttribute(0xF1, SmartNames.HostWrites,
|
||||
(byte[] r, byte v) => { return RawToInt(r, v) / 0x20; },
|
||||
SensorType.Data, 0),
|
||||
new SmartAttribute(0xF2, SmartAttributeNames.HostReads,
|
||||
new SmartAttribute(0xF2, SmartNames.HostReads,
|
||||
(byte[] r, byte v) => { return RawToInt(r, v) / 0x20; },
|
||||
SensorType.Data, 1),
|
||||
};
|
||||
|
||||
@@ -43,8 +43,8 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
new SmartAttribute(0x09, SmartAttributeNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartAttributeNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
};
|
||||
|
||||
public SSDPlextor(ISmart smart, string name, string firmwareRevision,
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is the Open Hardware Monitor code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Michael Möller <m.moeller@gmx.ch>.
|
||||
Portions created by the Initial Developer are Copyright (C) 2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
*/
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
using System.Collections.Generic;
|
||||
|
||||
[NamePrefix(""), RequireSmart(0xB0), RequireSmart(0xB1), RequireSmart(0xB2),
|
||||
RequireSmart(0xB3), RequireSmart(0xB4), RequireSmart(0xB5),
|
||||
RequireSmart(0xB6), RequireSmart(0xB7)]
|
||||
internal class SSDSamsung : AbstractHarddrive {
|
||||
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xAF, SmartNames.ProgramFailCountChip, RawToInt),
|
||||
new SmartAttribute(0xB0, SmartNames.EraseFailCountChip, RawToInt),
|
||||
new SmartAttribute(0xB1, SmartNames.WearLevelingCount, RawToInt),
|
||||
new SmartAttribute(0xB2, SmartNames.UsedReservedBlockCountChip, RawToInt),
|
||||
new SmartAttribute(0xB3, SmartNames.UsedReservedBlockCountTotal, RawToInt),
|
||||
|
||||
// Unused Reserved Block Count (Total)
|
||||
new SmartAttribute(0xB4, SmartNames.RemainingLife,
|
||||
null, SensorType.Level, 0),
|
||||
|
||||
new SmartAttribute(0xB5, SmartNames.ProgramFailCountTotal, RawToInt),
|
||||
new SmartAttribute(0xB6, SmartNames.EraseFailCountTotal, RawToInt),
|
||||
new SmartAttribute(0xB7, SmartNames.RuntimeBadBlockTotal, RawToInt),
|
||||
new SmartAttribute(0xBB, SmartNames.UncorrectableErrorCount, RawToInt),
|
||||
new SmartAttribute(0xBE, SmartNames.TemperatureExceedCount, RawToInt),
|
||||
new SmartAttribute(0xC2, SmartNames.AirflowTemperature),
|
||||
new SmartAttribute(0xC3, SmartNames.ECCRate),
|
||||
new SmartAttribute(0xC6, SmartNames.OffLineUncorrectableErrorCount, RawToInt),
|
||||
new SmartAttribute(0xC7, SmartNames.CRCErrorCount, RawToInt),
|
||||
new SmartAttribute(0xC9, SmartNames.SupercapStatus),
|
||||
new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus)
|
||||
};
|
||||
|
||||
public SSDSamsung(ISmart smart, string name, string firmwareRevision,
|
||||
int index, ISettings settings)
|
||||
: base(smart, name, firmwareRevision, index, smartAttributes, settings) { }
|
||||
}
|
||||
}
|
||||
@@ -44,23 +44,23 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
new SmartAttribute(0x05, SmartAttributeNames.RetiredBlockCount),
|
||||
new SmartAttribute(0x09, SmartAttributeNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartAttributeNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xAB, SmartAttributeNames.ProgramFailCount),
|
||||
new SmartAttribute(0xAC, SmartAttributeNames.EraseFailCount),
|
||||
new SmartAttribute(0xAE, SmartAttributeNames.UnexpectedPowerLossCount),
|
||||
new SmartAttribute(0xB1, SmartAttributeNames.WearRangeDelta),
|
||||
new SmartAttribute(0xB5, SmartAttributeNames.AlternativeProgramFailCount),
|
||||
new SmartAttribute(0xB6, SmartAttributeNames.AlternativeEraseFailCount),
|
||||
new SmartAttribute(0xC3, SmartAttributeNames.UnrecoverableEcc),
|
||||
new SmartAttribute(0xC4, SmartAttributeNames.ReallocationEventCount),
|
||||
new SmartAttribute(0xE7, SmartAttributeNames.RemainingLife,
|
||||
new SmartAttribute(0x05, SmartNames.RetiredBlockCount),
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xAB, SmartNames.ProgramFailCount),
|
||||
new SmartAttribute(0xAC, SmartNames.EraseFailCount),
|
||||
new SmartAttribute(0xAE, SmartNames.UnexpectedPowerLossCount),
|
||||
new SmartAttribute(0xB1, SmartNames.WearRangeDelta),
|
||||
new SmartAttribute(0xB5, SmartNames.AlternativeProgramFailCount),
|
||||
new SmartAttribute(0xB6, SmartNames.AlternativeEraseFailCount),
|
||||
new SmartAttribute(0xC3, SmartNames.UnrecoverableEcc),
|
||||
new SmartAttribute(0xC4, SmartNames.ReallocationEventCount),
|
||||
new SmartAttribute(0xE7, SmartNames.RemainingLife,
|
||||
null, SensorType.Level, 0),
|
||||
new SmartAttribute(0xF1, SmartAttributeNames.HostWrites,
|
||||
new SmartAttribute(0xF1, SmartNames.HostWrites,
|
||||
(byte[] r, byte v) => { return RawToInt(r, v); },
|
||||
SensorType.Data, 0),
|
||||
new SmartAttribute(0xF2, SmartAttributeNames.HostReads,
|
||||
new SmartAttribute(0xF2, SmartNames.HostReads,
|
||||
(byte[] r, byte v) => { return RawToInt(r, v); },
|
||||
SensorType.Data, 1)
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
/// <summary>
|
||||
/// Localization class for SMART attribute names.
|
||||
/// </summary>
|
||||
internal static class SmartAttributeNames {
|
||||
internal static class SmartNames {
|
||||
|
||||
public static string AirflowTemperature {
|
||||
get { return "Airflow Temperature"; }
|
||||
@@ -426,18 +426,6 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
get { return "Host Writes"; }
|
||||
}
|
||||
|
||||
public static string UsedReservedBlockCountChip {
|
||||
get { return "Used Reserved Block Count Chip"; }
|
||||
}
|
||||
|
||||
public static string UsedReservedBlockCountTotal {
|
||||
get { return "Used Reserved Block Count Total"; }
|
||||
}
|
||||
|
||||
public static string RuntimeBadBlockTotal {
|
||||
get { return "Runtime Bad Block Total"; }
|
||||
}
|
||||
|
||||
public static string HostReads {
|
||||
get { return "Host Reads"; }
|
||||
}
|
||||
@@ -445,5 +433,65 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
public static string MediaWearOutIndicator {
|
||||
get { return "Media Wear Out Indicator"; }
|
||||
}
|
||||
|
||||
public static string ProgramFailCountChip {
|
||||
get { return "Program Fail Count (Chip)"; }
|
||||
}
|
||||
|
||||
public static string EraseFailCountChip {
|
||||
get { return "Erase Fail Count (Chip)"; }
|
||||
}
|
||||
|
||||
public static string WearLevelingCount {
|
||||
get { return "Wear Leveling Count"; }
|
||||
}
|
||||
|
||||
public static string UsedReservedBlockCountChip {
|
||||
get { return "Used Reserved Block Count (Chip)"; }
|
||||
}
|
||||
|
||||
public static string UsedReservedBlockCountTotal {
|
||||
get { return "Used Reserved Block Count (Total)"; }
|
||||
}
|
||||
|
||||
public static string ProgramFailCountTotal {
|
||||
get { return "Program Fail Count (Total)"; }
|
||||
}
|
||||
|
||||
public static string EraseFailCountTotal {
|
||||
get { return "Erase Fail Count (Total)"; }
|
||||
}
|
||||
|
||||
public static string RuntimeBadBlockTotal {
|
||||
get { return "Runtime Bad Block Total"; }
|
||||
}
|
||||
|
||||
public static string UncorrectableErrorCount {
|
||||
get { return "Uncorrectable Error Count"; }
|
||||
}
|
||||
|
||||
public static string TemperatureExceedCount {
|
||||
get { return "Temperature Exceed Count"; }
|
||||
}
|
||||
|
||||
public static string ECCRate {
|
||||
get { return "ECC Rate"; }
|
||||
}
|
||||
|
||||
public static string OffLineUncorrectableErrorCount {
|
||||
get { return "Off-Line Uncorrectable Error Count"; }
|
||||
}
|
||||
|
||||
public static string CRCErrorCount {
|
||||
get { return "CRC Error Count"; }
|
||||
}
|
||||
|
||||
public static string SupercapStatus {
|
||||
get { return "Supercap Status"; }
|
||||
}
|
||||
|
||||
public static string ExceptionModeStatus {
|
||||
get { return "Exception Mode Status"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,12 +69,13 @@
|
||||
<Compile Include="Hardware\HDD\HDDGeneric.cs" />
|
||||
<Compile Include="Hardware\HDD\ISmart.cs" />
|
||||
<Compile Include="Hardware\HDD\SmartAttribute.cs" />
|
||||
<Compile Include="Hardware\HDD\SmartAttributeNames.cs" />
|
||||
<Compile Include="Hardware\HDD\SmartNames.cs" />
|
||||
<Compile Include="Hardware\HDD\RequireSmartAttribute.cs" />
|
||||
<Compile Include="Hardware\HDD\NamePrefixAttribute.cs" />
|
||||
<Compile Include="Hardware\HDD\SSDIndilinx.cs" />
|
||||
<Compile Include="Hardware\HDD\SSDIntel.cs" />
|
||||
<Compile Include="Hardware\HDD\SSDPlextor.cs" />
|
||||
<Compile Include="Hardware\HDD\SSDSamsung.cs" />
|
||||
<Compile Include="Hardware\HDD\SSDSandforce.cs" />
|
||||
<Compile Include="Hardware\IControl.cs" />
|
||||
<Compile Include="Hardware\IOControlCode.cs" />
|
||||
|
||||
Reference in New Issue
Block a user