From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from roobidoo.pudai.com (unknown [216.14.118.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 20CCA3B29D for ; Thu, 26 Mar 2020 15:31:07 -0400 (EDT) Received: from [71.219.63.218] (port=7704 helo=[10.168.3.100]) by roobidoo.pudai.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jHYDa-0000Ne-H9; Thu, 26 Mar 2020 14:31:06 -0500 Cc: tim@smallnetbuilder.com, flent-users@flent.org To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Make-Wifi-fast References: <52c7544e-6b3b-d43b-8e41-0b9ecf2cb33f@smallnetbuilder.com> <87blojnpis.fsf@toke.dk> From: Tim Higgins Message-ID: <754dde32-2d04-016c-bd2e-d5d4edbb1cc4@smallnetbuilder.com> Date: Thu, 26 Mar 2020 15:31:12 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <87blojnpis.fsf@toke.dk> Content-Type: text/html; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - roobidoo.pudai.com X-AntiAbuse: Original Domain - lists.bufferbloat.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - smallnetbuilder.com X-Get-Message-Sender-Via: roobidoo.pudai.com: authenticated_id: tim@timhiggins.com X-Authenticated-Sender: roobidoo.pudai.com: tim@timhiggins.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [Make-wifi-fast] Calling flent from python script X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 19:31:07 -0000
On 3/26/2020 10:45 AM, Toke H=C3=B8iland-J=C3=B8rgensen wrote:
Tim Higgins <tim@smalln=
etbuilder.com> writes:

Apologies that some discus=
sion with Toke and Dave took place outside this
list. At Dave's request, I'm bringing the conversation back here so that
others can benefit/contribute.

I'm exploring using flent for OFDMA performance testing. I'm using Win10
/AX200 STAs because the Win10 driver is the only one whose peformance I t=
rust,
in both bands and both directions.

I have a python 3 script that associates each Win10 STA, starts netserver=
 on
it and runs a short netperf TCP_STREAM test to check that the STA is reac=
hable
and that netserver is running. I have to do this because flent provides n=
o
indication (other than hanging) when it's not really running.

My problem is starting flent via the python script. Using the following,
works:
        p =3D subprocess.Popen(command, stdin=3Dsubprocess.PIPE,
stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.STDOUT, shell=3DTrue)
        (output, err) =3D p.communicate()
        print('\n>>> output : ', output)
        print('\n>>> err : ', err)

But I get no output until flent finishes. I know flent prints the followi=
ng
when it starts, if I start it in another terminal window:

/snb_devel$ flent rtt_fair_var -p all_scaled -l 10 -H 192.168.1.3 -H
192.168.1.15 -t "2.4 GHz Down NETGEAR RAX15 AX200Pico AX200mini OFDMA on"=
 -o
"snb_testresults/2020-03-25_16-06_netgear_rax15/2020-03-25_16-06_OFDMA_Tr=
affic_w_ping/2020-03-25_16-06_netgear_rax15_snbofdma_tnp_24g_dn.png"

Started Flent 1.2.2 using Python 3.6.9.
Starting rtt_fair_var test. Expected run time: 20 seconds.

I'll also get the above, plus the "Data file written..." result when I pr=
int
output as above, but not until flent finishes.

How can I get the two start lines returned to the python script when flen=
t
starts,  then the final data file written line when it finishes?
Rather than running Flent in this way, might I suggest you take a look
at the batch facility of Flent itself? That will allow you to specify a
list of tests to run, pre/post scripts before each test run, and easy
test repetition. It's there exactly for the purpose you are describing.

There's a commented example batch file here:

https://github.com/tohojo/flent/blob/mas=
ter/batchfile.example

And here's the file used for the example in the paper describing Flent:

https://github.com/tohojo/flent/blob/mas=
ter/flent-paper.batch

-Toke
Thanks for the suggestion, Toke. But I have to work within the structure of octoScope's python scripting API. At any rate, I was able to figure it out.