LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-18-2010, 08:11 PM   #1
buee
Member
 
Registered: May 2009
Posts: 81

Rep: Reputation: 16
iperf won't export all command output to text file


Any iperf experts out there. I've created a script to test network speeds but I've run in to a little problem. The command outputs this:

Code:
------------------------------------------------------------
Client connecting to 192.168.111.230, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  110 KByte (default)
------------------------------------------------------------
[  4] local 192.168.111.152 port 44700 connected with 192.168.111.230 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 2.0 sec   257 KBytes  1.05 Mbits/sec
[  4]  2.0- 4.0 sec   256 KBytes  1.05 Mbits/sec
[  4]  4.0- 6.0 sec   256 KBytes  1.05 Mbits/sec
[  4]  6.0- 8.0 sec   257 KBytes  1.05 Mbits/sec
[  4]  8.0-10.0 sec   256 KBytes  1.05 Mbits/sec
[  4] 10.0-12.0 sec   256 KBytes  1.05 Mbits/sec
[  4] 12.0-14.0 sec   257 KBytes  1.05 Mbits/sec
[  4] 14.0-16.0 sec   256 KBytes  1.05 Mbits/sec
[  4] 16.0-18.0 sec   256 KBytes  1.05 Mbits/sec
[  4] 18.0-20.0 sec   257 KBytes  1.05 Mbits/sec
[  4]  0.0-20.0 sec  2.50 MBytes  1.05 Mbits/sec
[  4] Sent 1785 datagrams
to the text file. But when you run the command from a shell rather than within a script, you get percentage of loss, jitter, etc etc. Anyone know why I'm not getting the most important lines of the command?
 
Old 10-19-2010, 11:34 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
I'm going to guess that it's sending that extra stuff to stderr instead of stdout. You can try redirecting both to the file at once. You didn't provide the actual command you used, but try using this for the redirection.
Code:
iperf &>filename  #for bash v.4.

iperf >filename 2>&1  #for older bash versions.

Last edited by David the H.; 10-19-2010 at 11:35 AM. Reason: fixed link
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to redirect the SCP command output to text file. gokuls Linux - General 10 02-22-2012 03:12 AM
[SOLVED] Output to a text file, the results of compound command Herbivore Linux - General 5 07-28-2010 11:38 AM
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 03:36 PM
command output to text file? meniscus Linux - Newbie 4 10-05-2006 06:29 AM
MAN Pages..can I export to a text file? phil1076 Linux - General 4 10-29-2001 09:11 AM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration