Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting any logged output on clients #4

Open
DavidHopkinsFbr opened this issue Mar 2, 2022 · 2 comments
Open

Not getting any logged output on clients #4

DavidHopkinsFbr opened this issue Mar 2, 2022 · 2 comments

Comments

@DavidHopkinsFbr
Copy link

DavidHopkinsFbr commented Mar 2, 2022

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?

@DavidHopkinsFbr
Copy link
Author

DavidHopkinsFbr commented Mar 2, 2022

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.

@jimsalterjrs
Copy link
Owner

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 " you'd be using $loadtest="/usr/local/bin/iperflogger ", and /usr/local/bin/iperflogger would look something like this:

#/bin/sh

/usr/bin/iperf $@ >> /tmp/logfile.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants