User Manual
TRex 107 / 113
threads: [8,9,10,11,12,13,14]
memory :
dp_flows : 1048576
v
1
v
1
add memory section with more flows
7.10.4 Traffic command
command
[bash]>sudo ./t-rex-64 -f cap2/cur_flow_single.yaml -m 30000 -c 7 -d 40 -l 1000 --active- ←-
flows 5000000 -p --cfg cfg/trex_08_5mflows.yaml
The number of active flows can be change using --active-flows CLI. in this example it is set to 5M flows
7.10.5 Script to get performance per active number of flows
def minimal_stateful_test(server,csv_file,a_active_flows):
trex_client = CTRexClient(server)
v
1
trex_client.start_trex(
v
2
c = 7,
m = 30000,
f = ’cap2/cur_flow_single.yaml’,
d = 30,
l = 1000,
p=True,
cfg = "cfg/trex_08_5mflows.yaml",
active_flows=a_active_flows,
nc=True
)
result = trex_client.sample_to_run_finish()
v
3
active_flows=result.get_value_list(’trex-global.data.m_active_flows’)
cpu_utl=result.get_value_list(’trex-global.data.m_cpu_util’)
pps=result.get_value_list(’trex-global.data.m_tx_pps’)
queue_full=result.get_value_list(’trex-global.data.m_total_queue_full’)
if queue_full[-1]>10000:
print("WARNING QUEU WAS FULL");
tuple=(active_flows[-5],cpu_utl[-5],pps[-5],queue_full[-1])
v
4
file_writer = csv.writer(test_file)
file_writer.writerow(tuple);
if __name__ == ’__main__’:
test_file = open(’tw_2_layers.csv’, ’wb’);
parser = argparse.ArgumentParser(description="Example for TRex Stateful, assuming ←-
server daemon is running.")
parser.add_argument(’-s’, ’--server’,
dest=’server’,
help=’Remote trex address’,
default=’127.0.0.1’,
type = str)
args = parser.parse_args()










