-
-
Notifications
You must be signed in to change notification settings - Fork 849
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
Make checkinterval for monitor configurable #31
Comments
* Implement feature request 'Make checkinterval for monitor configurable' (Issue #31)
Can you please help validate PR #97 ?
Once built, create a config file:
With the following:
The monitor process should now operate at whatever numeric value is set. |
Hi, will do shortly. Is monitor interval in milliseconds, seconds or minutes? |
Downloaded, installed, and started with a monitor_interval of 600 (Abasz, it’s seconds, per the readme).
Will monitor it and report back later.
One suggestion. On startup, note the monitor interval in syslog (along with the other startup messages), for completeness and peace of mind.
Also, syslog had the message “The item database is incompatible, re-creating database table structures”. I assume that this is OK, but noting it for completeness.
|
So, I tested this and although interval work there is a slight problem with this line: For instance, my library is rather big, so one monitor loop runs about 30 minutes. So if I set the checkInterval less than that it becomes continuous (apart from the first loop start where the interval is kept) since the above is always satisfied and check interval time is not honoured. |
I don’t have that problem with a 450GB library on a 100Mb internet connection. So far, things are working well here.
|
Will do - that is an easy one to add in & makes sense
Yes this is entirely normal due to providing a resolution for ensuring all database data is correct due to prior skilion issues.
Thanks for the feedback / use case. Will look at this logic & see how best to improve. |
I think lastCheckTime should be set to currTime at the end of the monitor loop rather than at the beginning and it should be sorted. |
agreed .. it is being set in the wrong place |
Submitted a new commit in the PR - 7a864a2 Can you re-pull / retest using the latest commit in the PR? This should fix:
|
I’m a total git novice, so I re-executed the commands you provided before:
```
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/97/head:pr97
git checkout pr97
make
make install
```
This must not be correct, because I don’t see the log line for the monitor mode interval. Help!
|
What is the command line your using? The log line will only echo out locally when using verbose mode or you can check the user activity log in the following locations:
Console:
Logfile:
|
I’m using ‘systemctl –user start onedrive.service’
I was checking /var/log/messages, but just checked the log in /var/log/onedrive, and it doesn’t have the monitor interval either, which is why I was thinking that perhaps I’ve pulled down the wrong branch from git.
Here’s what’s in the /var/log/onedrive/user.log
018-Aug-03 13:39:34.4402202 Syncing changes from OneDrive ...
2018-Aug-03 13:49:34.3801186 Syncing changes from OneDrive ...
2018-Aug-03 13:59:38.0396414 Initializing the Synchronization Engine ...
2018-Aug-03 13:59:53.0428269 Initializing the Synchronization Engine ...
2018-Aug-03 14:09:54.4136969 Syncing changes from OneDrive ...
|
OK .. the onedrive.service file does not include the |
Yes, indeed, turning on –verbose provides that, but also a bunch of other garp. Is it not possible to output the checkinterval without –verbose, as is done for “Initializing monitor…” and “Initializing the Synchronization engine”?
|
Yes this is easy to do - its a balancing act as to what level of information is appropriate for normal logging vs verbose logging. Pushed fc0c358 to PR97 to drop the logging level requirement. Can you please recheck? |
Agree that it’s a balancing act, but this is a global configuration item. It works correctly (translation: as I expected ??) now.
One other suggestion: Since the skip_file argument can be a bit “interesting”, it might be good to output that to the log on startup as well. In fact, why not go all the way and output sync_dir (and any other current or future config items as well). That creates warm and fuzzies for the user that you read the config file, and are operating as the user expects.
Thanks for your work on this, it’s really great! I’ve been running it since you added skip_file (I have 400+GB that I don’t want to sync locally).
|
There is work going on to totally overhaul all the logging - from normal, verbose through to debug
Agree in principal here, however for 'normal' log level no, for increased verbosity yes. Normal log level should be minimal + any errors, not entire configuration parameters being used at startup. A better option here is potentially a new |
That works as well. Thanks!
|
Although I do not what is wrong yet but the interval does not seem to be kept. Below is the log (I added some log entries manually to monitor the loop). Loop is set to 5min. Before the first loop timeout is kept. But later the next loop starts immediately
|
Thanks for the feedback - I see where it is going wrong at the moment - will post an update shortly. |
Confirmed, this works nicely. good work :) |
Closed due to PR #97 merged |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Can you add checkInterval property to config file or command line arg?
Now it's hardcoded in main.d:
The text was updated successfully, but these errors were encountered: