I just tested and it works nice!! Thank you Mariano. Just a quick note, to read from /var/log requires root privilege which many users cannot acquire. I tested using a bash script and then tailf the output file: #!/bin/sh while true; do echo $(date) sleep 2 done > output.txt Cheers, Hernán 2017-03-20 8:24 GMT-03:00 Mariano Martinez Peck <marianopeck@gmail.com>:
On Mon, Mar 20, 2017 at 6:00 AM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Hi guys,
I need to monitor Unix command execution inside the image. The commands use heavy computation so they usually report progress in the terminal.
Are OSProcess or OSSubprocess ready to do in-image monitoring so I can watch the same terminal output in the Transcript updating for example every 10 seconds?
Hi Hernan,
There is a tail -f example in OSSubprocess documentation that prints the result on an inpsector and updates it [1]. However, OSSubprocess has problems on Linux with the default VM... you must use the threaded heartbeat (not the itimer).. see recent threads discussions for this.
Let me know if that works.
[1] https://github.com/marianopeck/OSSubprocess#processing-streams-while- running
Particularly for OSProcess I couldn't find any method to fetch partial output.
Cheers,
Hernán
-- Mariano http://marianopeck.wordpress.com