I am trying to start an iPerf server (its a program similar to ping), and pipe its output to a .txt file.
On another PC, the client is sending traffic to this IP address.
Here is the command :
start "LocalFLServer" iperf -s -w 1024k -i 2 -B 10.42.113.120 -p5003
I want to pipe its output to a txt file, so I tried both
start "LocalFLServer" iperf -s -w 1024k -i 2 -B 10.42.113.120 -p5003 -o dl_tcp.txt
and
start "LocalFLServer" iperf -s -w 1024k -i 2 -B 10.42.113.120 -p5003 > dl_tcp.txt
But both instructions are not able to pipe the results to a .txt file.
The problem here is because I am starting this server on a separate command prompt using the 'start' command. I know it will write a .txt file if I remove the 'start'., but unfortunately, in the Perl script soon after I send this command using system()
, I need to run another instruction, or the program will not proceed further and would remain stuck which I dont want.
Help.
Edit : In Perl, I add/send the instruction like this :
system(start "LocalFLServer" iperf -s -w 1024k -i 2 -B 10.42.113.120 -p5003 -o dl_tcp.txt)