One other way is to run it as a systemctl service, I had issues with running it as screen where the Trex server would go unresponsive after running for prolonged period of time.
@ubuntu:/lib/systemd/system$ systemctl status trex.service
● trex.service - TREX Service
Loaded: loaded (/etc/systemd/system/trex.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-05-09 18:56:34 EDT; 2min 14s ago
Main PID: 926 (bash)
Tasks: 15
Memory: 93.4M
CPU: 1min 2.415s
CGroup: /system.slice/trex.service
├─ 926 /bin/bash t-rex-64 -i
├─1006 /usr/bin/python3 -m trex.scapy_server.scapy_zmq_server -s 4507
└─2058 ./_t-rex-64 -i
May 09 18:58:47 ubuntu bash[926]: opackets | 0 | 0
May 09 18:58:47 ubuntu bash[926]: obytes | 0 | 0
May 09 18:58:47 ubuntu bash[926]: ipackets | 53 | 52
May 09 18:58:47 ubuntu bash[926]: ibytes | 3022 | 2948
May 09 18:58:47 ubuntu bash[926]: ierrors | 0 | 0
May 09 18:58:47 ubuntu bash[926]: oerrors | 0 | 0
May 09 18:58:47 ubuntu bash[926]: Tx Bw | 0.00 bps | 0.00 bps
May 09 18:58:47 ubuntu bash[926]: -Global stats enabled
May 09 18:58:47 ubuntu bash[926]: Cpu Utilization : 0.0 %
May 09 18:58:47 ubuntu bash[926]: Platform_factor : 1.0
@ubuntu:/lib/systemd/system$ cat /etc/systemd/system/trex.service
[Unit]
Description=TREX Service
[Service]
WorkingDirectory=/opt/trex/v2.56
ExecStart=/bin/bash t-rex-64 -i
[Install]
WantedBy=multi-user.target
@ubuntu:/lib/systemd/system$