[csw-devel] SF.net SVN: gar:[15053] csw/mgar/pkg

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Wed Jul 13 15:45:44 CEST 2011


Revision: 15053
          http://gar.svn.sourceforge.net/gar/?rev=15053&view=rev
Author:   dmichelsen
Date:     2011-07-13 13:45:44 +0000 (Wed, 13 Jul 2011)

Log Message:
-----------
ttcp: Initial commit

Added Paths:
-----------
    csw/mgar/pkg/ttcp/
    csw/mgar/pkg/ttcp/Makefile
    csw/mgar/pkg/ttcp/branches/
    csw/mgar/pkg/ttcp/tags/
    csw/mgar/pkg/ttcp/trunk/
    csw/mgar/pkg/ttcp/trunk/Makefile
    csw/mgar/pkg/ttcp/trunk/checksums
    csw/mgar/pkg/ttcp/trunk/files/
    csw/mgar/pkg/ttcp/trunk/files/COPYING
    csw/mgar/pkg/ttcp/trunk/files/ttcp.1

Copied: csw/mgar/pkg/ttcp/Makefile (from rev 15048, csw/mgar/pkg/template/Makefile)
===================================================================
--- csw/mgar/pkg/ttcp/Makefile	                        (rev 0)
+++ csw/mgar/pkg/ttcp/Makefile	2011-07-13 13:45:44 UTC (rev 15053)
@@ -0,0 +1,15 @@
+# vim: ft=make ts=4 sw=4 noet
+
+default:
+	@echo "You are in the pkg/ directory."
+
+%:
+	$(MAKE) -C trunk $* 
+
+paranoid-%:
+	$(MAKE) -C trunk $* || exit 2 
+
+export BUILDLOG ?= $(shell pwd)/buildlog.txt
+
+report-%:
+	$(MAKE) -C trunk $* || echo "	*** make $* in $$i failed ***" >> $(BUILDLOG) 


Property changes on: csw/mgar/pkg/ttcp/trunk
___________________________________________________________________
Added: svn:ignore
   + cookies
download
work


Added: svn:externals
   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2


Added: csw/mgar/pkg/ttcp/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ttcp/trunk/Makefile	                        (rev 0)
+++ csw/mgar/pkg/ttcp/trunk/Makefile	2011-07-13 13:45:44 UTC (rev 15053)
@@ -0,0 +1,39 @@
+# $Id$
+# TODO (release-critical prefixed with !, non release-critical with *)
+#
+NAME = ttcp
+VERSION = 1.0
+GARTYPE = v2
+CATEGORIES = utils
+
+DESCRIPTION = Test TCP (TTCP) Benchmarking Tool
+define BLURB
+endef
+
+MASTER_SITES = http://www.pcausa.com/Utilities/pcattcp/
+DISTNAME = LinuxTTCP
+DISTFILES  = $(DISTNAME).zip
+DISTFILES += COPYING
+DISTFILES += ttcp.1
+
+VENDOR_URL = http://www.pcausa.com/Utilities/pcattcp.htm
+
+EXTRA_LINKER_FLAGS = -lsocket -lnsl
+
+CONFIGURE_SCRIPTS =
+BUILD_SCRIPTS = custom
+TEST_SCRIPTS =
+INSTALL_SCRIPTS = custom
+
+include gar/category.mk
+
+build-custom:
+	cd $(WORKSRC) && $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ttcp ttcp.c
+	@$(MAKECOOKIE)
+
+install-custom:
+	ginstall -d $(DESTDIR)$(bindir)
+	ginstall -m 755 $(WORKSRC)/ttcp $(DESTDIR)$(bindir)/ttcp
+	ginstall -d $(DESTDIR)$(mandir)/man1
+	ginstall -m 644 $(WORKDIR)/ttcp.1 $(DESTDIR)$(mandir)/man1
+	@$(MAKECOOKIE)


Property changes on: csw/mgar/pkg/ttcp/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
   + Id

Added: csw/mgar/pkg/ttcp/trunk/checksums
===================================================================
--- csw/mgar/pkg/ttcp/trunk/checksums	                        (rev 0)
+++ csw/mgar/pkg/ttcp/trunk/checksums	2011-07-13 13:45:44 UTC (rev 15053)
@@ -0,0 +1 @@
+5b4707910c24fec212609f862bc53749  LinuxTTCP.zip

Added: csw/mgar/pkg/ttcp/trunk/files/COPYING
===================================================================
--- csw/mgar/pkg/ttcp/trunk/files/COPYING	                        (rev 0)
+++ csw/mgar/pkg/ttcp/trunk/files/COPYING	2011-07-13 13:45:44 UTC (rev 15053)
@@ -0,0 +1,15 @@
+The notice below was taken from comments in the ttcp.c source code.
+
+ * Usable on 4.2, 4.3, and 4.1a systems by defining one of
+ * BSD42 BSD43 (BSD41a)
+ *
+ * Modified for operation under 4.2BSD, 18 Dec 84
+ *      T.C. Slattery, USNA
+ * Minor improvements, Mike Muuss and Terry Slattery, 16-Oct-85.
+ *
+ * Mike Muuss and Terry Slattery have released this code to the Public Domain.
+
+
+Some copies of ttcp claim the original author is unknown. However, according to
+http://ftp.arl.mil/~mike/ttcp.html
+Mike Muuss (now deceased) was the original author

Added: csw/mgar/pkg/ttcp/trunk/files/ttcp.1
===================================================================
--- csw/mgar/pkg/ttcp/trunk/files/ttcp.1	                        (rev 0)
+++ csw/mgar/pkg/ttcp/trunk/files/ttcp.1	2011-07-13 13:45:44 UTC (rev 15053)
@@ -0,0 +1,143 @@
+'\"macro stdmacro
+.TH TTCP 1 local
+.SH NAME
+ttcp \- test TCP and UDP performance
+.SH SYNOPSIS
+.B ttcp \-t
+.RB [ \-u ]
+.RB [ \-s ]
+.RB [ \-p\0 \fIport\fP ]
+.RB [ \-l\0 \fIbuflen\fP ]
+.RB [ \-b\0 \fIsize\fP ]
+.RB [ \-n\0 \fInumbufs\fP ]
+.RB [ \-A\0 \fIalign\fP ]
+.RB [ \-O\0 \fIoffset\fP ]
+.RB [ \-f\0 \fIformat\fP ]
+.RB [ \-D ]
+.RB [ \-v]
+.RB host
+.RB [ < in ]
+.br
+.B ttcp \-r
+.RB [ \-u ]
+.RB [ \-s ]
+.RB [ \-p\0 \fIport\fP ]
+.RB [ \-l\0 \fIbuflen\fP ]
+.RB [ \-b\0 \fIsize\fP ]
+.RB [ \-A\0 \fIalign\fP ]
+.RB [ \-O\0 \fIoffset\fP ]
+.RB [ \-f\0 \fIformat\fP ]
+.RB [ \-B ]
+.RB [ \-T ]
+.RB [ \-v ]
+.RB [ > out ]
+.SH DESCRIPTION
+.I Ttcp
+times the transmission and reception of data between two systems using 
+the UDP or TCP protocols.
+It differs from common ``blast'' tests, which tend to measure the remote
+.I inetd
+as much as the network performance, and which usually do not allow 
+measurements at the remote end of a UDP transmission.
+.PP
+For testing, the transmitter should be started with \f3\-t\f1 and \f3\-s\f1
+after the receiver has been started with \f3\-r\f1 and \f3\-s\f1.
+Tests lasting at least tens of seconds should be used to obtain accurate
+measurements.
+Graphical presentations of throughput versus buffer size for
+buffers ranging from tens of bytes to several ``pages'' can illuminate
+bottlenecks.
+.PP
+.I Ttcp
+can also be used as a ``network pipe'' for moving directory hierarchies
+between systems when routing problems exist or when the use of other
+mechanisms is undesirable. For example, on the destination machine, use:
+.Ex
+ttcp \-r \-B | tar xvpf \-
+.Ee
+.PP
+and on the source machine:
+.Ex
+tar cf \- directory | ttcp \-t dest_machine
+.Ee
+.PP
+Additional intermediate machines can be included by:
+.Ex
+ttcp \-r | ttcp \-t next_machine
+.Ee
+.SH OPTIONS
+.TP 10
+\-t
+Transmit mode.
+.TP 10
+\-r
+Receive mode.
+.TP 10
+\-u
+Use UDP instead of TCP.
+.TP 10
+\-s
+If transmitting, source a data pattern to network;
+if receiving, sink (discard) the data.
+Without the \f3\-s\f1 option, the default is to transmit data from
+.I stdin
+or print the received data to
+.IR stdout .
+.TP 10
+\-l \fIlength\fP
+Length of buffers in bytes (default 8192).
+For UDP, this value is the number of data bytes in each packet.
+The system limits the maximum UDP packet length. This limit can be 
+changed with the \f3\-b\f1 option.
+.TP 10
+\-b \fIsize\fP
+Set size of socket buffer.  The default varies from system to system.
+This parameter affects the maximum UDP packet length.
+It may not be possible to set this parameter on some systems
+(for example, 4.2BSD).
+.TP 10
+\-n \fInumbufs\fP
+Number of source buffers transmitted (default 2048).
+.TP 10
+\-p \fIport\fP
+Port number to send to or listen on (default 2000).
+On some systems, this port may be allocated to another network daemon.
+.TP 10
+\-D
+If transmitting using TCP, do not buffer data when sending
+(sets the TCP_NODELAY socket option).
+It may not be possible to set this parameter on some systems
+(for example, 4.2BSD).
+.TP 10
+\-B
+When receiving data, output only full blocks, 
+using the block size specified by \f3\-l\f1.
+This option is useful for programs, such as \f2tar\f1(1), that require
+complete blocks.
+.TP 10
+\-A \fIalign\fP
+Align the start of buffers to this modulus (default 16384).
+.TP 10
+\-O \fIoffset\fP
+Align the start of buffers to this offset (default 0).
+For example, ``\-A8192 \-O1'' causes buffers to start at the second byte
+of an 8192-byte page.
+.TP 10
+\-f \fIformat\fP
+Specify, using one of the following characters, 
+the format of the throughput rates as 
+kilobits/sec ('k'), kilobytes/sec ('K'), 
+megabits/sec ('m'), megabytes/sec ('M'), 
+gigabits/sec ('g'), or gigabytes/sec ('G').
+The default is 'K'.
+.TP 10
+\-T
+``Touch'' the data as they are read in order to measure cache effects.
+.TP 10
+\-v
+Verbose: print more statistics.
+.TP 10
+\-d
+Debug: set the SO_DEBUG socket option.
+.SH SEE ALSO
+ping(1M), traceroute(1M), netsnoop(1M)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list