Statistics collection using Python API

61 views
Skip to first unread message

Vivek Sharma

unread,
May 2, 2025, 2:46:33 PMMay 2
to TRex Traffic Generator
Adding for easier reference for others who might be interested in pulling statistics from Trex and are new to Python Automation APIs for Tres.


Good example to begin with:


This example walks through 
- connecting to the trex server
- Resetting the ports
- loading the profile ( if profile has latency flag set, one can also get latency stats)
- Clearing stats
- Starting traffic
- Retrieving stats using get_stats() API in dictionary format
- Disconnect from server

Other references found useful:
Reply all
Reply to author
Forward
0 new messages