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 <hernan.morales@gmail.com>:
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.
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
Cheers,
Hernán
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
Hi Mariano, On 20 March 2017 at 12:24, Mariano Martinez Peck <marianopeck@gmail.com> 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
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
participants (4)
-
Alistair Grant -
Hernán Morales Durand -
Mariano Martinez Peck -
Thierry Goubier