stressdisk
stressdisk copied to clipboard
Status file get's corrupted on restart
I'm doing a long term test to wear out an SD card by writing together with a combination of periodic power outages.
Have set stressdisc
as a systemd sctipt that runs on startup:
/usr/bin/stressdisk -statsfile /home/root/status -logfile /home/root/stress-log-sd -duration 48h0m0s -stats 1m0s -s 500000 cycle /data/senic-hub/logs
I need to delete the /home/root/status
every time before running it otherwise I end up with a failed start 2018/06/25 16:26:44 error reading statsfile: EOF
@TheMeaningfulEngineer wrote:
I'm doing a long term test to wear out an SD card by writing together with a combination of periodic power outages.
I love it!
I need to delete the /home/root/status every time before running it otherwise I end up with a failed start 2018/06/25 16:26:44 error reading statsfile: EOF
Is the status file empty? If so why? Disk Full?
Do you think it is to do with the power outages or something like that?
Can you see if the status file appears empty when it is running?
Is the status file empty? If so why? Disk Full?
Don't know why. It does end up being empty while there is still space on the disk.
Can you see if the status file appears empty when it is running?
When it's running it's filling it correctly.
Do you think it is to do with the power outages or something like that?
Possibly. Could be the file ends up corrupted or something. Don't know.
I think I might have misunderstood from the docs.
-statsfile string File to load/store statistics data (default "stressdisk_stats.json")
Does that mean the stats file is mandatory or not?
Does that mean the stats file is mandatory or not?
It allows stressdisk to carry on accumulating stats over restarts. It isn't essential but it will always be used.
If you want not to use it then it could use detect an empty file string and disable the use of the stats file?