From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-27-2015 03:44 PM
I am trying to write a LabVIEW wrapper for the comandline program iperf https://iperf.fr/
If I start iperf running with the commandline iperf -c10.1.14.107 -u -p5002 -b300M -t60 -i2 iperf will run for 60 seconds and repoort bandwidth every 2 seconds
I do not want to wait for the 60 seconds to end before LabVIEW gets it's "standard output"
I need it to take each update as iperf puts them on the screen and update an indicator (for now) in LabVIEW
I have tried piping iperf to a file and watching the file for changes, but I run into a sharing (file locked) situation because iperf and LabVIEW are trying to access the same file.
Second question:
Anyone know a quick and dirty way to make LabVIEW generate and measure through put on UPD traffic like iperf does
We need to verify 300 megabit down and 120 megabit up throughput during our environmental testing.
02-28-2015 01:32 AM
I don't have the iperf tool, but reading System Exec file, updated from ping, works for me (Windows 7).
If you get file access problems with your command line program, it may help if you periodically copy the file and try to read the copy.
02-28-2015 04:02 PM
Ok, I downloaded iperf and used the previously posted code with it. It works without any file access problems.
03-01-2015 11:47 PM - edited 03-01-2015 11:47 PM
Intresting, that is very much simmilar to what I tried and LabView could not open the file because it was inuse by another program.
I will look at it again in the morning.
03-02-2015 11:57 AM
Okay, yeah I see what you are doing but....
Using a temp file is proving not a good idea, as I have to run Iperf for an extended time one enverionmental we do is a 7 day cycle.
Iperf needs to be running continusly to keep the data throughput on the device >= 80% of max.
So after a while opening and simply displaying the temp file will be problematic as it's size grows.
03-02-2015 12:19 PM
Probably you can write a batch file and run iperf in a loop. Each iteration will run iperf for some period of time, then rename the temporary file, for example by adding a timestamp to the name, and go to the next step. This will keep the temporary file size reasonable and the LabVIEW code can read always from the same file.