-P per 5h 5m 5s?

What is the problem you are having with rclone?

Ye, as you can see in the command I tried to run, I know it obviously wrong, but I want to add 5h 5m or 5s after -P like below, any idea how to work around this?
I know --stats, but I don't think it's the same thing as -P you know?
Thank you:)

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

rclone v1.57.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 4.4.0-19041-Microsoft (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

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

Google Drive, One Drive

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

rclone -P 5s sync -i oD_JC:test gD:test

The rclone config contents with secrets removed.

[gD]
type = drive
scope = drive
token = {"access_token":"token_was_here","token_type":"Bearer","refresh_token":"token_was_here","expiry":"2022-01-03T22:59:18.5752709-08:00"}
team_drive = team_drive_id
root_folder_id = 

[oD_1ove]
type = onedrive
token = {"access_token":"token_was_here","expiry":"2022-01-08T03:21:54.5363655-08:00"}
drive_id = onedrive_id
drive_type = business

[oD_JC]
type = onedrive
token = {"access_token":"token_was_here","expiry":"2022-01-03T22:17:45.6093716-08:00"}
drive_id = onedrive_id
drive_type = business

A log from the command with the -vv flag

Error: unknown command "log" for "rclone"

Did you mean this?
        ls
        lsd
        lsf
        lsl

Run 'rclone --help' for usage.
You could use 'rclone selfupdate' to get latest features.

2022/01/09 18:58:51 Fatal error: unknown command "log" for "rclone"

Did you mean this?
        ls
        lsd
        lsf
        lsl

What are you expecting to happen with the 5 hours / 5 minutes? What is the desired behavior you are trying to get?

oh my bad, it's just problem on my side, sorry for asking

oh wait sorry I mixed up --stats and -P. Im trying to run a bot that take what print to screen and send it to user. For some reason my code can take output with -P flag, but couldn't get output with --stats
so my output be something like this with -P flag, so yeah, that's why I asked if it possible to put delay for -P:

Transferring:
[5:57 PM]
*                           AirExplorer-log.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer-logs.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer4-log.txt:  0% /3.531Mi, 0/s, -Transferred:   \t          0 B / 10.593 MiB, 0%, 0 B/s, ETA -
[5:57 PM]
Checks:                 1 / 1, 100%
[5:57 PM]
Transferred:            0 / 3, 0%
[5:57 PM]
Elapsed time:        18.0s
[5:57 PM]
Transferring:
[5:57 PM]
*                           AirExplorer-log.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer-logs.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer4-log.txt:  0% /3.531Mi, 0/s, -Transferred:   \t          0 B / 10.593 MiB, 0%, 0 B/s, ETA -
[5:57 PM]
Checks:                 1 / 1, 100%
[5:57 PM]
Transferred:            0 / 3, 0%
[5:57 PM]
Elapsed time:        18.5s
[5:57 PM]
Transferring:
[5:57 PM]
*                           AirExplorer-log.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer-logs.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer4-log.txt:  0% /3.531Mi, 0/s, -Transferred:   \t    3.531 MiB / 10.593 MiB, 33%, 0 B/s, ETA -
[5:57 PM]
Checks:                 1 / 1, 100%
[5:57 PM]
Transferred:            0 / 3, 0%
[5:57 PM]
Elapsed time:        19.0s
[5:57 PM]
Transferring:
[5:57 PM]
*                           AirExplorer-log.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer-logs.txt:  0% /3.531Mi, 0/s, -
[5:57 PM]
*                          AirExplorer4-log.txt:100% /3.531Mi, 0/s, -Transferred:   \t   10.593 MiB / 10.593 MiB, 100%, 225.907 KiB/s, ETA 0s
[5:57 PM]
Checks:                 1 / 1, 100%

-P is for progress and just displays output to the screen. It's meant for interactive use and not really for log scraping since it's stdout.

I'm not sure what you ran to generate the output you shared since there's no command.

All the stats flags are here:

      --stats duration                       Interval between printing stats, e.g. 500ms, 60s, 5m (0 to disable) (default 1m0s)
      --stats-file-name-length int           Max file name length in stats (0 for no limit) (default 45)
      --stats-log-level string               Log level to show --stats output DEBUG|INFO|NOTICE|ERROR (default "INFO")
      --stats-one-line                       Make the stats fit on one line
      --stats-one-line-date                  Enable --stats-one-line and add current date/time prefix
      --stats-one-line-date-format string    Enable --stats-one-line-date and use custom formatted date: Enclose date string in double quotes ("), see https://golang.org/pkg/time/#Time.Format
      --stats-unit string                    Show data rate in stats as either 'bits' or 'bytes' per second (default "bytes")

You should focus on them instead of -P and you can use something like:

-v --stats 5h

kek, because my bot will read the output from stdout, is there anyway to send whatever the output are using --stats to stdout?
oh, and I forgot, my main point is I want to see stat in realtime that's why I didn't use log file
Here the command to get above output:

yes ! | ./rclone -P --bwlimit-file 5M sync -i oD_JC:test gD:test

and I tried out the command like you said, it doesn't seem for my bot to get stuff out, probably because it wasn't get to stdout? idk, too bad with this stuff:

yes ! | ./rclone -v --stats 10s --bwlimit-file 5M sync -i oD_JC:test gD:test

You'd want to read a log file rather than that.

hello and welcome to the forum,

not sure your use-case and what the bot is, but can get stats using
https://rclone.org/rc/#core-stats

thanks i'll consider it

never work with api before, i'll try it out somehow, thanks:)

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