Exec and updated output

I hesitated to ask this question, as I'm sure the answer is in the documentation somewhere...

I have an EXEC node which does an SCP to a remote raspberry pi 3. The copy is pretty big ~1G. When issuing scp from the command line, I get updates as to the progress of the copy xx% of xxxx.

I've tried setting the option in the exec node as SPAWN, and attached a function node to log to the console the output coming from the exec node. Nothing comes out until the copy is complete. I've also tried a STATUS node, referencing the exec node to no avail.

My goal is to display in my UI, the % copied, or "loading", or whatever, until it completes.

Any idea how to get updated status on exec commands with multiple outputs??

If the progress goes straight to the terminal rather than via stdout then I don't think you can get it. At least I don't know how.
You could possibly monitor the size of the destination file, though that won't work if scp goes via a temporary file.

yes - scp is clever enough to know you are redirecting it and not show the progress - logging - How to best capture and log scp output? - Stack Overflow
(or maybe use rsync)

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