Hello,
I tried with following code and was able to read the output of the iperf program.
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
p.StartInfo.FileName = "F:\\SCRAP\\IPREF\\iperf.exe";
p.StartInfo.Arguments = "-c 10.91.10.217 -p 8080";
p.Start();
p.WaitForExit();
string output = p.StandardOutput.ReadToEnd();
Console.WriteLine(output);
Here is the output I received
------------------------------------------------------------
Client connecting to 10.91.10.217, TCP port 8080
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.91.105.145 port 55538 connected with 10.91.10.217 port 8080
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1897666874917397 bits 1920124492449476278251040091125s/sec
Regards,