Show HDD warnings based on sectors (#97)
If one of the following metrics is >0 an warning is shown * Reallocated_Sector_Count * Current_Pending_Sector * Offline_Uncorrectable Reviewed-on: #97 Co-authored-by: localhorst <localhorst@mosad.xyz> Co-committed-by: localhorst <localhorst@mosad.xyz>
This commit was merged in pull request #97.
This commit is contained in:
+11
-2
@@ -72,7 +72,10 @@ private:
|
||||
uint32_t u32ErrorCount = 0U;
|
||||
uint32_t u32PowerOnHours = 0U; // in hours
|
||||
uint32_t u32PowerCycles = 0U;
|
||||
uint32_t u32Temperature = 0U; // in Fahrenheit, just kidding: degree Celsius
|
||||
uint32_t u32Temperature = 0U; // in Fahrenheit, just kidding: degree Celsius
|
||||
uint32_t u32ReallocatedSectors = 0U; // ID 0x05 - Reallocated Sectors Count
|
||||
uint32_t u32PendingSectors = 0U; // ID 0xC5 - Current Pending Sector Count
|
||||
uint32_t u32UncorrectableSectors = 0U; // ID 0xC6 - Offline Uncorrectable Sector Count
|
||||
} sSmartData;
|
||||
|
||||
private:
|
||||
@@ -106,6 +109,9 @@ public:
|
||||
uint32_t getPowerOnHours(void); // in hours
|
||||
uint32_t getPowerCycles(void);
|
||||
uint32_t getTemperature(void); // in Fahrenheit, just kidding: degree Celsius
|
||||
uint32_t getReallocatedSectors(void);
|
||||
uint32_t getPendingSectors(void);
|
||||
uint32_t getUncorrectableSectors(void);
|
||||
void checkFrozenDrive(void);
|
||||
|
||||
void setDriveSMARTData(std::string modelFamily,
|
||||
@@ -115,7 +121,10 @@ public:
|
||||
uint32_t errorCount,
|
||||
uint32_t powerOnHours,
|
||||
uint32_t powerCycles,
|
||||
uint32_t temperature);
|
||||
uint32_t temperature,
|
||||
uint32_t reallocatedSectors,
|
||||
uint32_t pendingSectors,
|
||||
uint32_t uncorrectableSectors);
|
||||
|
||||
std::string sCapacityToText();
|
||||
std::string sErrorCountToText();
|
||||
|
||||
Reference in New Issue
Block a user