Bug 49811 - ttcp -r stats output appended to data output
ttcp -r stats output appended to data output
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: ttcp (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-24 05:53 EDT by jm493
Modified: 2007-04-18 12:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-22 08:42:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
replace add stdout's with stderr (1.96 KB, patch)
2001-07-24 05:54 EDT, jm493
no flags Details | Diff

  None (edit)
Description jm493 2001-07-24 05:53:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.5-0.2.9 i686)

Description of problem:
ttcp -r  sends both the transmitted data, and the connection logging and
transfer statistics to stdout.  This adds junk to the end of file
transfers, and prevents using ttcp for network integrity checking.

How reproducible:
Always

Steps to Reproduce:
1. In window a$ ttcp -r > x.x
2. In window b$ dd if=/dev/zero bs=1 count=100 | ttcp -t localhost
3. in window a$ ls -l x.x ; cat -v x.x
	

Actual Results:  $ ttcp -r > x.x
ttcp-r: socket
ttcp-r: accept from 127.0.0.1
$ ls -l x.x ; cat -v x.x
-rw-r--r--    1 johnm    cos           340 Jul 24 19:51 x.x
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ttcp-r:
buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: 100 bytes in 0.00 real seconds = 22.83 KB/sec +++
ttcp-r: 2 I/O calls, msec/call = 2.19, calls/sec = 467.51
ttcp-r: 0.0user 0.0sys 0:00real 0% 0i+0d 0maxrss 0+1pf 0+0csw
========
e.g.  first 2 printfs go to stderr, rest get appended to data file (now 340
bytes instead of 100).


Expected Results:  $ /usr/src/redhat/BUILD/ttcp-1.12/ttcp -r > x.x   
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001  tcp
ttcp-r: socket
ttcp-r: accept from 127.0.0.1
ttcp-r: 100 bytes in 0.00 real seconds = 25.81 KB/sec +++
ttcp-r: 2 I/O calls, msec/call = 1.94, calls/sec = 528.54
ttcp-r: 0.0user 0.0sys 0:00real 0% 0i+0d 0maxrss 0+1pf 0+0csw
$ ls -l x.x ; cat -v x.x
-rw-r--r--    1 johnm    cos           100 Jul 24 19:52 x.x
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$ 
========
e.g. all the printfs go to stderr, transferred file is same size as sent.


Additional info:

It may also be a good idea to add a -q flag to supress all diagnositc
output.
Comment 1 jm493 2001-07-24 05:54:54 EDT
Created attachment 24687 [details]
replace add stdout's with stderr
Comment 2 Pekka Savola 2001-07-24 06:22:17 EDT
Nice one.  Also fixed now in my src.rpm at
http://www.netcore.fi/pekkas/linux/ipv6/.

As for '-q'..  I think that'd be rather non-mainstream use, and better would be
just
to redirect stderr to /dev/null locally if needed.
Comment 3 Jim Wright 2001-12-10 18:13:48 EST
this bug from july 2001 rawhide is still present in final RH72, and is still
marked new in bugzilla.
Comment 4 Radek Vokal 2005-02-22 08:42:30 EST
I've pushed out new version of ttcp with several changes (mainly from Pekka's
upstream)

Note You need to log in before you can comment on or make changes to this bug.