T-rex Statistics Gui for statefull mode

728 views
Skip to first unread message

Gökay Aydın

unread,
Oct 9, 2021, 5:43:47 AM10/9/21
to TRex Traffic Generator
Hi guys,

I'm running t-rex on the stateful mode. I want to get all the statistics and see historically and on GUI. There is T-rex Stateless Gui which works on stateless mode as far sa i checked. So, what is the easist way to grap all the stats on the tests we ran on statefull mode ?

./t-rex-64 --cfg /etc/320g.yaml -f cap2/test.yaml -m 27


-Per port stats table
 per port - limited to 4   
      ports |               0 |               1 |               2 |               3
 -----------------------------------------------------------------------------------------
   opackets |        10221687 |        10211213 |        10220710 |        10210394
     obytes |     15557409136 |     15541467708 |     15555920620 |     15540221190
   ipackets |         7295378 |         5090878 |         7337139 |         5093868
     ibytes |     11103563868 |      7748317838 |     11137777002 |      7752868618
    ierrors |               0 |               0 |               0 |               0
    oerrors |               0 |               0 |               0 |               0
      Tx Bw |       9.88 Gbps |       9.88 Gbps |       9.88 Gbps |       9.88 Gbps

-Global stats enabled
 Cpu Utilization : 95.7  %  41.3 Gb/core
 Platform_factor : 1.0  
 Total-Tx        :     316.18 Gbps  
 Total-Rx        :     154.63 Gbps  
 Total-PPS       :      25.97 Mpps  
 Total-CPS       :       1.60 Mcps  

 Expected-PPS    :     268.80 Mpps  
 Expected-CPS    :      16.80 Mcps  
 Expected-BPS    :       3.26 Tbps  

 Active-flows    :   319162  Clients :      496   Socket-util : 1.0218 %    
 Open-flows      : 20324168  Servers :      496   Socket :   319162 Socket/Clients :  643.5
 Total_queue_full : 68344463         
 drop-rate       :     161.56 Gbps   
 current time    : 24.2 sec  
 test duration   : 3575.8 sec  

Best Regards,
Gökay

Besart Dollma

unread,
Oct 9, 2021, 5:56:02 AM10/9/21
to TRex Traffic Generator
Hi Gökay, 
The GUI is developed by a separate team, and indeed works only for Stateless.
Stateful is long deprecated, please use ASTF.
For ASTF, we provide a complete Python API which offers your the ability to collect the stats in a msec resolution.
Thanks,

Gökay Aydın

unread,
Oct 14, 2021, 3:46:46 AM10/14/21
to TRex Traffic Generator
Hi again,

Let me ask another thing on the same topic. We need able to see Rx=155Gbps and Tx=155Gpbs in total in our test. We can see that in normal stateful mode below with %33.4 cpu usage.
I tried with advanced statefull mdoe astf , but i can only able to reach around 142Gbps for both Rx and Tx and my cpu goes %99 and traffic does not go beyond 142Gbps.

I gave details of scripts and pcaps that i'm using. My question is that are there any way to reach 155Gbps both Rx and Tx in advanced stateful mode ? Can we make any optimization or configuration to reach it ?


----------Statefull Mode --------

*Using this command. ./t-rex-64 --cfg /etc/320g.yaml -f cap2/sekom5.yaml -m 19.15 -d 20

-Per port stats table
 per port - limited to 4   
      ports |               0 |               1 |               2 |               3
 -----------------------------------------------------------------------------------------
   opackets |        30932758 |        30932899 |        30255638 |        30255521
     obytes |     47079657676 |     47079872278 |     46049081036 |     46048902962
   ipackets |        30905969 |        30819912 |        30225253 |        30235690
     ibytes |     47038879026 |     46907907586 |     46002830796 |     46018720180
    ierrors |               0 |               0 |               0 |               0
    oerrors |               0 |               0 |               0 |               0
      Tx Bw |       4.95 Gbps |       4.95 Gbps |       4.84 Gbps |       4.82 Gbps

-Global stats enabled
 Cpu Utilization : 33.4  %  57.7 Gb/core
 Platform_factor : 1.0  
 Total-Tx        :     154.39 Gbps  
 Total-Rx        :     154.18 Gbps  
 Total-PPS       :      12.68 Mpps  
 Total-CPS       :     764.34 Kcps  

 Expected-PPS    :     128.69 Mpps  
 Expected-CPS    :       8.04 Mcps  
 Expected-BPS    :       1.56 Tbps  

 Active-flows    :   119095  Clients :      496   Socket-util : 0.3813 %    
 Open-flows      : 58527460  Servers :      496   Socket :   119095 Socket/Clients :  240.1
 drop-rate       :      38.61 Gbps   
 current time    : 90.1 sec  
 test duration   : 1909.9 sec  
 *** TRex is shutting down - cause: 'CTRL + C detected'
 latency daemon has stopped
 All cores stopped !!

*Here is the test.yaml we are using. It is using this pcap.

[root@localhost v2.92]# cat cap2/test.yaml
#
# Simple IMIX test 1518B
#
- duration : 3
  generator :  
          distribution : "seq"
          clients_start : "16.0.0.1"
          clients_end   : "16.0.1.255"
          servers_start : "48.0.0.1"
          servers_end   : "48.0.1.255"
          clients_per_gb : 201
          min_clients    : 101
          dual_port_mask : "1.0.0.0"
          tcp_aging      : 0
          udp_aging      : 0
#
# The templates are duplicated on purpose in order to utilize all DRAM bandwidth and get better performance
# Should do this automaticlly in the future somehow. You should have at least 8 templates
#
  cap_info :
     - name: cap2/udp_last.pcap
       cps   : 20000
       ipg   : 10000
       rtt   : 10000
       w     : 1
       limit : 200
     - name: cap2/udp_last.pcap
       cps   : 20000
       ipg   : 10000
       rtt   : 10000
       w     : 1
       limit : 200


---------------- Advanced Statefull Mode -------------

./t-rex-64 --cfg /etc/320g.yaml -i --astf
start -f astf/udp_pcap_gok.py -m 8000000 -d 100

 per port - limited to 4   
      ports |               0 |               1 |               2 |               3
 -----------------------------------------------------------------------------------------
   opackets |        12520580 |        12255970 |        12778752 |        12514387
     obytes |     19056324282 |     18653586340 |     19449260544 |     19046898536
   ipackets |        12255896 |        12482187 |        12514277 |        12737688
     ibytes |     18653472338 |     18997890136 |     19046726772 |     19386761136
    ierrors |               0 |          226198 |               0 |          223268
    oerrors |               0 |               0 |               0 |               0
      Tx Bw |       3.98 Gbps |       3.98 Gbps |       4.53 Gbps |       4.53 Gbps

-Global stats enabled
 Cpu Utilization : 99.8  %  16.9 Gb/core
 Platform_factor : 1.0  
 Total-Tx        :     142.14 Gbps  
 Total-Rx        :     142.03 Gbps  
 Total-PPS       :      10.11 Mpps  
 Total-CPS       :       1.45 Mcps  

 Expected-PPS    :       0.00  pps  
 Expected-CPS    :       0.00  cps  
 Expected-L7-BPS :       0.00  bps  

 Active-flows    :  4194898  Clients :        0   Socket-util : 0.0000 %    
 Open-flows      : 21071900  Servers :        0   Socket :        0 Socket/Clients :  -nan
 Total_queue_full : 71352607         
 drop-rate       :       0.00  bps   
 current time    : 67.3 sec  
 test duration   : 0.0 sec  


*I'm using start -f astf/udp_pcap_gok.py -m 8000000 -d 100 this command to start in astf mode.
*I'm using astf/udp_pcap_gok.py this script below. Using same pcap file /cap2/udp_last.pcap with normal statefull mode as above. 


# Example for creating your program from pcap file

from trex.astf.api import *
import argparse


class Prof1():

    def get_profile(self, tunables, **kwargs):
        parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__file__)),
                                         formatter_class=argparse.ArgumentDefaultsHelpFormatter)

        args = parser.parse_args(tunables)

        file = kwargs.get('file', "../cap2/udp_last.pcap")
        # ip generator
        ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq")
        ip_gen_s = ASTFIPGenDist(ip_range=["48.0.0.0", "48.0.255.255"], distribution="seq")
        ip_gen = ASTFIPGen(glob=ASTFIPGenGlobal(ip_offset="1.0.0.0"),
                           dist_client=ip_gen_c,
                           dist_server=ip_gen_s)

        return ASTFProfile(default_ip_gen=ip_gen,
                            cap_list=[ASTFCapInfo(file=file,
                            cps=1)])



def register():
    return Prof1()


9 Ekim 2021 Cumartesi tarihinde saat 12:56:02 UTC+3 itibarıyla besi7...@gmail.com şunları yazdı:

Besart Dollma

unread,
Oct 14, 2021, 4:10:56 PM10/14/21
to TRex Traffic Generator
Hi,
You still aren't using multiple cores for ASTF.
Thanks, 

Badhan K

unread,
Apr 21, 2022, 1:43:20 PM4/21/22
to TRex Traffic Generator
So for each pci port we have to assign unique client and server IP ?
        ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq")
        ip_gen_s = ASTFIPGenDist(ip_range=["48.0.0.0", "48.0.255.255"], distribution="seq")
What if the client or server IPs I have are not in sequence ?

Reply all
Reply to author
Forward
0 new messages