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? Particularly for OSProcess I couldn't find any method to fetch partial output. Cheers, Hernán |
2017-03-20 10:00 GMT+01:00 Hernán Morales Durand <[hidden email]>:
GitFileTree does fetch partial output over OSProcess, but this is quite a low-level use of OSProcess. What is missing is true pseudo-tty support. Regards, Thierry
|
In reply to this post by hernanmd
On Mon, Mar 20, 2017 at 6:00 AM, Hernán Morales Durand <[hidden email]> wrote:
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.
|
Hi Mariano,
On 20 March 2017 at 12:24, Mariano Martinez Peck <[hidden email]> wrote: > > .... > > 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 Cool! Thanks for pointing this out. I've just hit the same requirement, and this will also prompt me to move to the threaded VM. Cheers! Alistair |
In reply to this post by Mariano Martinez Peck
I just tested and it works nice!! Thank you Mariano. Cheers,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 2017-03-20 8:24 GMT-03:00 Mariano Martinez Peck <[hidden email]>:
|
Free forum by Nabble | Edit this page |