Export counters for packets and connections in trex

306 views
Skip to first unread message

Robert Blomberg

unread,
Nov 23, 2017, 8:43:36 AM11/23/17
to TRex Traffic Generator
Hi guys!

Is it possible to extract counters in trex for RX - packets, TX-packets, etc in Stateful-mode?

We want to use trex, but don't want to poll counters from the DUT, but from Trex to verify that the values on the DUT and trex are the same so we could measure accuracy.

/Robert

Yaroslav Brustinov

unread,
Nov 23, 2017, 9:03:26 AM11/23/17
to Robert Blomberg, TRex Traffic Generator
Hi,

TRex stateful sends stats by ZMQ publisher (port 4500 by default):

If the server was started by trex_daemon_server, it is possible also to query the results by Python JSON-RPC commands from the server, or by usual Python API from trex-client.

Docs on trex-client:

Thanks,
Yaroslav.

--
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/2005372b-596c-41fd-a023-babc9d4a515f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Blomberg

unread,
Nov 24, 2017, 3:43:52 AM11/24/17
to TRex Traffic Generator
Cool, this would work.

Thanks Yaroslav.

/Robert


On Thursday, 23 November 2017 15:03:26 UTC+1, y.brustinov wrote:
Hi,

TRex stateful sends stats by ZMQ publisher (port 4500 by default):

If the server was started by trex_daemon_server, it is possible also to query the results by Python JSON-RPC commands from the server, or by usual Python API from trex-client.

Docs on trex-client:

Thanks,
Yaroslav.
On Thu, Nov 23, 2017 at 3:43 PM, Robert Blomberg <robert.b...@gmail.com> wrote:
Hi guys!

Is it possible to extract counters in trex for RX - packets, TX-packets, etc in Stateful-mode?

We want to use trex, but don't want to poll counters from the DUT, but from Trex to verify that the values on the DUT and trex are the same so we could measure accuracy.

/Robert

--
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.

hanoh haim

unread,
Nov 24, 2017, 4:46:11 AM11/24/17
to Robert Blomberg, TRex Traffic Generator
Simple example here

There is python API documentation in the main page

Hanoh

For more options, visit https://groups.google.com/d/optout.
--
Hanoh
Sent from my iPhone

Robert Blomberg

unread,
Nov 24, 2017, 5:41:34 AM11/24/17
to TRex Traffic Generator
Oh, this is really awesome.

Thanks alot, Hanoh.

/Robert
Reply all
Reply to author
Forward
0 new messages