-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
backgrounding and redirecting iperf3 server oddity #138
Comments
From [email protected] on February 21, 2014 13:14:35 I acknowledge seeing this report. In step 2 when you did a test doing tee to /dev/stdout, note that tee(1) send its stdin to stdout and to the file you specify, so getting two copies on stdout is expected. It feels to me like you're seeing the effects of buffering of output in various places (particularly with the result from the test in the previous paragraph having non-interleaved lines of output) but I haven't actually experimented with this. |
From [email protected] on February 21, 2014 14:26:48 This is also somewhat related to Issue 119 . |
From [email protected] on February 23, 2014 09:16:45 Hi, I agree. Obviously. buffering on reports --> It seems to me that there is no fflush per iprintf call (but more likely at closing of the stream ?) while my tee is line buffered: correctly print two identical lines then wait 1 sec before printing two identicals linesmaybe this has to do with some buffering options set on the fd for stdout. I agree. Thanks for your work. |
From [email protected] on February 23, 2014 09:21:38 This might be an interesting pointer http://stackoverflow.com/questions/13932932/why-does-stdout-need-explicit-flushing-when-redirected-to-file |
Closing this issue for now, not an iperf3 problem and lack of further feedback. |
From [email protected] on February 17, 2014 03:18:19
What steps will reproduce the problem? 1. write a script that iperf as a server and redirect its output (i.e. tee) (only way I know to monitor report server side)
2. in the script background iperf and wait for it (to handle signals)
3. launch this script itself in background (nohup if you like) What is the expected output? What do you see instead? 0. if I just launch the script (backgrounding iperf, but not the script)
Linux sd-41347 3.2.0-4-amd64 setting of window size should be explicit #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux Please provide any additional information below. cat iperf_server.sh
!/bin/bash
while [ 0 ];
do
iperf3 --server --port 22222 --verbose | tee /tmp/iperf3.log.raw | awk '{print strftime("%F %T",systime()),$0; fflush()}' | tee /tmp/iperf3.log
wait $!
if [ $? ];
then
sleep 1;
fi;
done
and
nohup ./iperf_server.sh > /dev/stdnull &
Original issue: http://code.google.com/p/iperf/issues/detail?id=138
The text was updated successfully, but these errors were encountered: