LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

refreshing standard output when tailing a logfile

I am using the system exec vi to call a ssh command line utility.  I am trying to tail a logfile and when i run minimized I don't see results in the standard output but when don't run minimized i see the logfile. 
 
How can I capture the results in the standard output while minimizing the command prompt ?
 
 
Thanks
 
James
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 1 of 4
(2,853 Views)

Hello James,

 

Forgive this question if I’m missing something obvious here, but I am a little unclear on exactly what you are trying to do.  It sounds like you are using the system exec VI in conjunction with an SSH session and a log file.  I am a little unclear on the relationship between the three.  First, how are you using the System Exec VI with SSH?  Are you using SSH commands in the command prompt, or using the command prompt to open something like Putty?  Second, what are you trying to do with the log file?  Third, when you say that you don’t “see the results in the standard output” are you looking for the results in LabVIEW or in the command prompt window?  Perhaps a screen-shot of your program might be a good idea for troubleshooting as well.

 

I look forward to hearing back from you -

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 4
(2,839 Views)
I am calling plink from the systemexec.  This utility allows command line ssh commands.  I want to tail a logfile with this command and process the standard output as it arrives.  When i run minimized i do not get results in the standard output until i end the plink task.  if run minimized is false i only get data when i close the window.  If wait until completion is false then standard output is not available. 
 
 
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 3 of 4
(2,834 Views)

Good evening James,

I am still a little unclear on what you wish to accomplish here (I don’t know exactly what you mean by “tail a log file with this command”), but I believe I can explain the behavior of the System Exec VI.

If you choose not to wait until complete, the VI will dispatch the command and continue execution without waiting, and therefore will not return anything from stdout.  If you choose to wait, the VI will not return anything until either the task is complete or the window is closed (i.e. the close ends the task).

It may be the case that this VI is not one you will be able to use as desired.  I do not believe there is any way to constantly monitor and process the data in stdout with this VI.  You may need to switch to a solution which uses either the raw TCP commands or maybe ActiveX.

Hopefully this helps to explain the System Exec VI.  Please don’t hesitate to let us know if you have any additional questions.

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 4
(2,817 Views)