Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status file get's corrupted on restart #9

Open
TheMeaningfulEngineer opened this issue Jun 26, 2018 · 3 comments
Open

Status file get's corrupted on restart #9

TheMeaningfulEngineer opened this issue Jun 26, 2018 · 3 comments

Comments

@TheMeaningfulEngineer
Copy link

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

@ncw
Copy link
Owner

ncw commented Jun 26, 2018

@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?

@TheMeaningfulEngineer
Copy link
Author

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?

@ncw
Copy link
Owner

ncw commented Jul 3, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants