update shred metric in main thread instead of shred thread
This commit is contained in:
@ -27,6 +27,7 @@ public:
|
||||
time_t u32ShredTimeDelta;
|
||||
std::chrono::time_point<std::chrono::system_clock> chronoShredTimestamp;
|
||||
unsigned long ulWrittenBytes;
|
||||
unsigned long ulSpeedMetricBytesWritten;
|
||||
} sShredSpeed;
|
||||
|
||||
bool bWasShredded = false;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define WORSE_POWERUP 10000 //mark drive if at this limit or beyond
|
||||
#define SHRED_ITERATIONS 3U
|
||||
#define FROZEN_TIMEOUT 10 //After this timeout (minutes) the drive will be marked as frozen
|
||||
#define METRIC_THRESHOLD 3UL*1000UL*1000UL*1000UL //calc shred speed with this minimum of time delta
|
||||
|
||||
// Logger Settings
|
||||
#define LOG_PATH "./reHDD.log"
|
||||
@ -84,6 +85,7 @@ private:
|
||||
static void searchDrives(list <Drive>* plistDrives);
|
||||
static void printDrives(list <Drive>* plistDrives);
|
||||
static void startShredAllDrives(list <Drive>* plistDrives);
|
||||
static void updateShredMetrics(list <Drive>* plistDrives);
|
||||
static void filterIgnoredDrives(list <Drive>* plistDrives);
|
||||
static void filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNewDrives);
|
||||
static void addSMARTData(list <Drive>* plistDrives);
|
||||
|
Reference in New Issue
Block a user