network-testing
network-testing copied to clipboard
Not getting any logged output on clients
I'm trying to use net-hydra to run iperf on a pool of clients all at the same time - my goal is to measure the impact of increasing the number of wifi clients on average request latency in a LAN.
My directives are all of the form clientId = $loadtest, and the loadtest directive is defined as:
$loadtest = "/usr/bin/iperf --trip-times -l 128 -b 51.2k,5k -t 30 -e -c 10.3.0.125 >> /tmp/symmetric-30-$when.log"
The actual load test runs fine, and the log file ~/symmetric-30-NNNNNNN.log gets created, but there's never any output captured in the actual log file. When I run the exact same command line locally on the individual test nodes, they do generate log files with the expected content. I'm not sure why it's not working when the command is run by net-hydra. Is it possibly related to daemonisation by whenits?
I've tried output redirection with >> and piping through to tee but neither of them capture any output from the source task. Unfortunately iperf's documented -o/--output filename option is broken so it doesn't look like I can have it write the file itself.
I suspect what's happening is the output redirection is happening on the host running net-hydra, not on the clients running iperf.
Short of patching the code in net-hydra to make sure redirection requests happen on the client side, the simplest way around it is likely to create a simple shell script on your clients that runs iperf with any included arguments, and redirects its output locally.
So instead of $loadtest="/usr/bin/iperf
#/bin/sh
/usr/bin/iperf $@ >> /tmp/logfile.txt