Python Forum
logging values from constantly updating CLI app
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
logging values from constantly updating CLI app
#1
I use rclone to transfer large files to my cloud bucket. The upload command takes a flag that shows a constantly updating transfer speed readout in the terminal window (see image link at bottom). It looks like it updates about once every second.

Strategically what I want to do is make a graph of speed vs elapsed time. Initially I would guess I'd need to write the displayed values to a text or csv. Is there any module that can do this?

Thanks so much

Joe

https://i.imgur.com/fUlmMin.png
Reply
#2
From what I've read, rclone doesn't produce any output (unless you are doing rclone cat) but it does log to stderr. Try running rclone and redirecting stderr to a file.
Output:
rclone copy /local/path remote:path 2> statistics.txt
Look at the statistics.txt file. Does it contain the information you need?

If the file contains the information you want, there are many things you could do. You could process the file after the rclone command is complete and produce a file that could be used for making plots. Maybe save the data in CSV format so it could be opened in excel, or use plotting tools available in Python. You could read the log information as it is produced and update a live plot. The live plot could be a pretty Matplotlib plot, or it could be a simple ASCII bar chart.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Constantly Crashing mat189 0 256 Jan-22-2024, 07:18 AM
Last Post: mat189
  Values not updating for restful call boomramada 0 1,667 Mar-13-2021, 01:08 PM
Last Post: boomramada
  updating certain values in dict. with relation to their keys malevy 17 5,359 Nov-27-2019, 02:37 PM
Last Post: buran
  Updating dictionary values Sukumar 2 2,463 Oct-03-2018, 09:53 PM
Last Post: Sukumar
  updating values in objects mercator 2 3,070 Dec-07-2017, 07:41 PM
Last Post: mercator
  How do I run background functions constantly Mondaythe1st 5 11,916 Jul-25-2017, 09:39 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020