Controlling core/bwlimit with Schedule

What is the problem you are having with rclone?

Controlling bwlimit with schedule using rc core/bwlimit

Run the command 'rclone version' and share the full output of the command.

$ rclone version
rclone v1.57.0-DEV
- os/version: centos 8 (64 bit)
- os/kernel: 4.18.0-383.el8.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.12
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

$ rclone rc core/bwlimit rate="02:00,off 08:00,20M:off"
2022/06/05 03:48:37 Failed to rc: Failed to read rc response: 500 Internal Server Error: {
        "error": "need exactly 1 bandwidth setting",
        "input": {
                "rate": "02:00,off 08:00,20M:off"
        "path": "core/bwlimit",
        "status": 500

According to: Remote Control / API

The format of the parameter is exactly the same as passed to --bwlimit except only one bandwidth may be specified.

However, The format of the parameter is exactly the same does not appear to be true as running the following command does seem to work :
rclone mount --rc --bwlimit "04:00,off 08:00,20M:off"

I am able to get the rc command to work with the following:

$ rclone rc core/bwlimit rate=20Mi:off
        "bytesPerSecond": -1,
        "bytesPerSecondRx": -1,        "bytesPerSecondTx": 20971520,
        "rate": "20Mi:off"}

Is my understanding of the documentation correct? It feels like the documentation should be updated to reflect it does allow for the upload and download to be specified, however schedule does not appear to work, so the parameters are not exactly the same.

If the mount command is running with rc, and has a schedule passed to it (verified working) and I turn off the rate limit with the rclone rc core/bwlimit rate=off command, and then turn it back on with the rclone rc core/bwlimit rate=20Mi:off command, does it then respect the schedule previously defined with the mount? If not, is there a way to specify the schedule via rc?

Updated to 1.58.1 and the behavior remains the same.

This sentence

The format of the parameter is exactly the same as passed to --bwlimit except only one bandwidth may be specified.

Was written before the separately controllable up/down.

The intention is that you can only set the bandwidth for now, you can't set a schedule, so it should probably say that.

If you fancy sending an update the docs are here: rclone/token_bucket.go at a9c49c50a06ebf7cea0aaa3329dd0fb3b9fcef9a · rclone/rclone · GitHub

You can edit by clicking the pencil icon and sending a change for us to review, or making a PR in the usual way.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.