# Exec and updated output

**URL:** <https://discourse.nodered.org/t/exec-and-updated-output/47841>\
**Category:** General\
**Created:** [30 June 2021 15:56 UTC](https://discourse.nodered.org/t/exec-and-updated-output/47841 "2021-06-30T15:56:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyEllixson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andyellixson/32/37081_2.png) [@andyEllixson](https://discourse.nodered.org/u/andyEllixson)\
**Post date:** [30 June 2021 15:56 UTC](https://discourse.nodered.org/t/exec-and-updated-output/47841/1 "2021-06-30T15:56:53Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/d/ed4439ee06a7bdb2c1a9bb155d51df2b947c8ff3.png)

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??

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 June 2021 16:18 UTC](https://discourse.nodered.org/t/exec-and-updated-output/47841/2 "2021-06-30T16:18:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 June 2021 16:24 UTC](https://discourse.nodered.org/t/exec-and-updated-output/47841/3 "2021-06-30T16:24:32Z")

</div>

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](https://stackoverflow.com/questions/202432/how-to-best-capture-and-log-scp-output)  
(or maybe use rsync)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 August 2021 16:25 UTC](https://discourse.nodered.org/t/exec-and-updated-output/47841/4 "2021-08-29T16:25:18Z")

</div>

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