Flent-users discussion archives
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Tim Higgins <tim@smallnetbuilder.com>,
	Make-Wifi-fast <make-wifi-fast@lists.bufferbloat.net>
Cc: flent-users@flent.org
Subject: Re: [Flent-users] [Make-wifi-fast] Calling flent from python script
Date: Thu, 26 Mar 2020 15:45:31 +0100	[thread overview]
Message-ID: <87blojnpis.fsf@toke.dk> (raw)
In-Reply-To: <52c7544e-6b3b-d43b-8e41-0b9ecf2cb33f@smallnetbuilder.com>

Tim Higgins <tim@smallnetbuilder.com> writes:

> Apologies that some discussion 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 trust,
> 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 reachable
> and that netserver is running. I have to do this because flent provides no
> indication (other than hanging) when it's not really running.
>
> My problem is starting flent via the python script. Using the following,
> works:
>         p = subprocess.Popen(command, stdin=subprocess.PIPE,
> stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
>         (output, err) = p.communicate()
>         print('\n>>> output : ', output)
>         print('\n>>> err : ', err)
>
> But I get no output until flent finishes. I know flent prints the following
> 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_Traffic_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 print
> output as above, but not until flent finishes.
>
> How can I get the two start lines returned to the python script when flent
> 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/master/batchfile.example

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

https://github.com/tohojo/flent/blob/master/flent-paper.batch

-Toke


_______________________________________________
Flent-users mailing list
Flent-users@flent.org
http://flent.org/mailman/listinfo/flent-users_flent.org

           reply	other threads:[~2020-03-26 14:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <52c7544e-6b3b-d43b-8e41-0b9ecf2cb33f@smallnetbuilder.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.flent.org/postorius/lists/flent-users.flent.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blojnpis.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=flent-users@flent.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=tim@smallnetbuilder.com \
    --subject='Re: [Flent-users] [Make-wifi-fast] Calling flent from python script' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox