Parity Check and Dockers pause


Recommended Posts

I have parity check scheduled for once per month and during the check I would like to have certain dockers pause their activity, this mainly applies to Sab as it uses a reasonable amount of cpu to unpack and move files. Is it possible to write a script that would do this, if so where can I find more details on this?

Link to comment
  • 2 years later...

I'm noticing a small issue with the script above. I am using the Parity Check Tuning plugin to ensure that parity only runs during specific hours like in the middle of the night. Because of this, I noticed that when the plugin pauses parity check, "mdResyncPos" variable Squid's script checks is >0 and so my stop script isn't being called. Is there something else I can have the script check that will reliably tell me that parity is actively running?

 

I've been polling that value while parity check is running and it looks like it might stay at a single value for quite a while so I don't think polling with a script would be very accurate.

Link to comment
18 minutes ago, NichollsGlen said:

I'm noticing a small issue with the script above. I am using the Parity Check Tuning plugin to ensure that parity only runs during specific hours like in the middle of the night. Because of this, I noticed that when the plugin pauses parity check, "mdResyncPos" variable Squid's script checks is >0 and so my stop script isn't being called. Is there something else I can have the script check that will reliably tell me that parity is actively running?

 

I've been polling that value while parity check is running and it looks like it might stay at a single value for quite a while so I don't think polling with a script would be very accurate.

 mdResyncPos is set to be none-zero when a parity check starts and its value indicates the point currently reached.   You can then use mdResync to test if it is currently running (this is 0 when it is paused).

Link to comment

Sounds good, thanks for the guidance!

 

I don't know PHP and the simple changes I tried all caused the script to go haywire, so I ported and modified your script in Python - it can be found at https://github.com/GlenNicholls/unraid_parity_scripter . It uses JSON for the containers to stop when parity is running and containers to start when paused/stopped. I need to add some more stuff to make it generic such that it can be used out of the box in a generic environment, but your suggestions work.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.