How to log the latency output of tui

299 views
Skip to first unread message

onlyz...@gmail.com

unread,
Aug 12, 2016, 2:02:02 AM8/12/16
to TRex Traffic Generator
Hi

We need to capture the log of the trex tui console latency output to a file. Is there example available.

Thanks & Regards
Zafirul Hassan


hanoh haim

unread,
Aug 12, 2016, 2:05:28 AM8/12/16
to onlyz...@gmail.com, TRex Traffic Generator
Hi, 
Have you consider to use the API for that?
Have a look into the stl/examples folder how to do it.

You would be able to run the TUI and script in parallel.

Thanks
Hanoh 
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/11d4ca94-edac-4c80-81c2-21a0b968a436%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

onlyz...@gmail.com

unread,
Aug 12, 2016, 2:08:37 AM8/12/16
to TRex Traffic Generator, onlyz...@gmail.com

hanoh haim

unread,
Aug 12, 2016, 2:14:27 AM8/12/16
to onlyz...@gmail.com, TRex Traffic Generator
Hi,
The TUI uses the API to get the raw information and print it to the screen.
If you want to print to a file (the TUI results), it probably possible with a little hacks in the code.
The right way is to take an API example and save the JSON result to a file.
It would be simpler to parse.
But again this
It depends on the bigger picture you want to achive.


Hanoh

On Friday, 12 August 2016, <onlyz...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/11d4ca94-edac-4c80-81c2-21a0b968a436%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

onlyz...@gmail.com

unread,
Aug 12, 2016, 2:15:07 AM8/12/16
to TRex Traffic Generator, onlyz...@gmail.com
Hi Hanoh,

I am run the tui and script on separate console. Since the Latency logs dynamically changing and only the Max value remains at the end of test.
How can i capture the Average and minimum latency for a port.

Also i need this information to be stored in a log file or can i redirect the tui output.


Thanks
Zafirul

hanoh haim

unread,
Aug 12, 2016, 2:23:28 AM8/12/16
to onlyz...@gmail.com, TRex Traffic Generator
Hi,
I think I understand your issue now,
Let's take this example 


In this example we start the traffic and *wait* to the result while you want the result while it is running right?
    c.start(ports = [tx_port])
    c.wait_on_traffic(ports = [tx_port])


There is another API that you can convert the 
wait_on_traffic to 

a loop that read the counters, save them to a file and exit once the traffic finished.

Will some example like that help you?

For more options, visit https://groups.google.com/d/optout.


--

hanoh haim

unread,
Aug 12, 2016, 2:35:25 AM8/12/16
to onlyz...@gmail.com, TRex Traffic Generator
See the example-2 from this link (is_traffic_active API)

https://trex-tgn.cisco.com/trex/doc/cp_stl_docs/api/client_code.html
> To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/11d4ca94-edac-4c80-81c2-21a0b968a436%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
>
> HanohSent from my iPhone



On Friday, 12 August 2016 11:35:28 UTC+5:30, Hanoch Haim  wrote:
> Hi, 
> Have you consider to use the API for that?
> Have a look into the stl/examples folder how to do it.
>
>
> You would be able to run the TUI and script in parallel.
>
>
> Thanks
> Hanoh 
>
> On Friday, 12 August 2016,  <onlyz...@gmail.com> wrote:
> Hi
>
>
>
> We need to capture the log of the trex tui console latency output to a file. Is there example available.
>
>
>
> Thanks & Regards
>
> Zafirul Hassan
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

>
> To post to this group, send email to trex...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/11d4ca94-edac-4c80-81c2-21a0b968a436%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
>
> HanohSent from my iPhone

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.

To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/47847c33-e0fd-4a4a-8560-6c21ed999881%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

bapi1...@gmail.com

unread,
Aug 23, 2016, 4:38:15 AM8/23/16
to TRex Traffic Generator, onlyz...@gmail.com
Hi,

I want to sent the packets with .0001 % loss rate. Do we have any script in Trex,
Please suggest

With Regards
Zafirul Hassan

Reply all
Reply to author
Forward
0 new messages