Scripts/programs to test FreeBSD ethernet interfaces.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
916 B

  1. # Note:
  2. # Make sure you run the server w/ the -J option so that the JSON
  3. # version of the server info is provided instead of the raw text.
  4. set -e
  5. outfile=pps.run.$(TZ=UTC date -Iminutes)
  6. : > ${outfile}
  7. for tx_pipe in $(jot 4 1); do
  8. for frame_max in $( jot 20 4 ); do
  9. (cd /usr/src/sys/modules/usb/cdce; make CONF_CFLAGS="-DCDCE_FRAMES_MAX=${frame_max} -DCDCE_MAX_TX=${tx_pipe}" clean all install) > /dev/null
  10. sleep .5
  11. sh reload.cdce.sh
  12. sleep .5
  13. starttime=$(TZ=UTC date -Iseconds)
  14. export tx_pipe frame_max starttime
  15. jexec testjail iperf3 --get-server-output -J -l 40 -b 800mbps -u -c 172.29.5.4 | jq '. + { tx_pipe: env.tx_pipe, frame_max: env.frame_max, starttime: env.starttime }' >> ${outfile}
  16. jq -c '{ tx_pipe, frame_max, pps: .server_output_json.intervals | map((.sum.packets - .sum.lost_packets) / .sum.seconds) | max }' ${outfile} | tail -n 1
  17. done
  18. done
  19. echo results written to: ${outfile}