Commit 79bdba0c authored by Jonas Smedegaard's avatar Jonas Smedegaard

Imported Upstream version 2.7.4

parents
2.7.4:
------
Print the message that we switch to normal from O_DIRECT only when
verbose > 0.
2.7.3:
------
More c flags changes for more portability.
2.7.2:
------
Fix compilation under Redhat-7.3.
2.7.1:
------
Support for $CSTREAM_AUDIO_BITRATE.
2.7.0:
------
Support for O_SYNC and O_DIRECT, but only on the output side for now.
Please send mail if you want this for input.
2.6.1:
------
Timer-based throughput reports from -T<n> will now also print what the
throughput since the last report was. Useful when performance changes
during runtime.
2.6.0:
------
Bandwidth limiting was not > 4 GB clean on platforms with 32 bit
integers. I had lost an already existing fix here.
2.5.2:
------
Commandline options, options to -O and -I:
-ON
-IN
which prevents cstream from interpreting filenames with ":" in them as
TCP specifications. By default the presense of a colon means host:port.
2.5.1:
------
Add option -T <interval> which will print the statistics every
<interval> seconds.
2.5:
----
There was a 4 GB limitation on 32 bit machines when you used bandwith
limiting. Thanks to Sergey M. Serov for reporting!
2.4.1b:
-------
Use SO_REUSEADDR on serving socket.
2.4:
----
Bandwidth limiting is not not only as a strict maximum at any point in
time but now you can also limit for the session as a whole. Do so by
giving a negative bandwidth limit. To make it clear: if the session
was running below the limit for some time for other bottlenecks in the
chain, then it will run above the limit to make good for it at other
times when it can.
2.3:
----
Identical to 2.3b3, sigchld handling is assumed to be correct now and
works with various versions of the Linux kernel.
Version 2.3 has sound support, see e.g. `cstream -Oa -o /dev/dsp`.
2.3b3:
------
Further SIGCHLD fixes.
2.3b2:
------
Fix SIGCHLD handling so that stopping and continuing the child in a
concurrent mode would not terminate.
2.3b1:
------
Version 2.3 has sound support, see e.g. `cstream -Oa -o /dev/dsp`
version 2.2:
------------
TCP/IP socket support.
Linux glibc 64 bit files.
Version 2.1:
------------
- Add audio mode: -O a/-I a try to switch output file into CD-quality
16bit 44100Hz stereo mode. If input is just generated, a sine wave
of 440 Hz will be played.
- Add tee-fd mode. -O t will copy the stream to file descriptor 3
(which must already be opened by parent process).
Version 2.0:
------------
- Add -c flag for concurrent mode.
- Add -B flag (buffering of multiple input blocks before output
blocks are written).
- Add -l flag (statistics will include line count).
- If input data is just 'generated', use a buffer that remotely
resembles ASCII text with a line length of 76 chars and has a
newline at the end of data.
- Number of bytes transferred is also displayed in GB/MB/KB, if
appriopriate.
- Change throughput report to be shorter.
- Add automatic tests `make check`.
- Througput reporting on signals got the wrong time when cstream was
not called with -v > 0.
- Use SIGINFO for throughput report.
- Use more values from configure script.
- Throughput report is now asynchronous, not after next read() or write().
- Throughput report will report buffer fillage if -B is in use.
Version 1.4:
------------
- Fix Linux compilation problems.
- The -b and -t options now also recognize 'k', 'm', 'g' for kilo-,
mega-, gigabyte like the -n option did.
- The signal for shutdown is now SIGUSR2, not SIGHUP.
Version 1.3:
------------
- Fix permissions of created files
- You can now specify the input file without using a switch (if it is
the last argument)
- Improve messages
Version 1.2:
------------
- Argument checking for -v was broken, fixed.
Version 1.1:
------------
- Fix version number reporting, introduce -V switch.
- Fix usage() typos.
Version 1.0:
------------
- Initial version.
cstream is copyright 1998, 1999 by Martin Cracauer.
The license is similar to the X consortium license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
dis- tribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the fol- lowing conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABIL- ITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABIL- ITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cstream follows the usual GNU configure building process:
./configure --prefix=/usr/local
make
make install
The following compile-time options are supported:
-------------------------------------------------
--enable-notcp Leave out TCP/IP socket code
--enable-nosound Leave out audio control code
AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = cstream
cstream_SOURCES = cstream.c
man_MANS = cstream.1
EXTRA_DIST = TODO README CHANGES COPYRIGHT INSTALLATION cstream.1
SUBDIRS = auxdir tests
# Don't work anymore, output changed
#TESTS = tests/test1.sh
This diff is collapsed.
cstream is a general-purpose stream-handling tool like UNIX' dd,
usually used in commandline-constructed pipes.
Featues:
Sane commandline switch syntax.
Exact throughput limiting, on the incoming side. Timing variance in
previous reads are counterbalanced in the following reads.
Precise throughput reporting. Either at the end of the transmission
or everytime SIGUSR1 is received. Quite useful to ask lengthy
opertions how much data has been transferred yet, i.e. when
writing tapes. Reports are done in bytes/sec and if appropriate in
KB/sec or MB/sec, where 1K = 1024.
SIGUSR2 causes a clean shutdown before EOF on input, timing
informating is displayed.
Build-in support to write its PID to a file, for painless sending of
these signals.
Build-in support for fifos. Example usage is a 'pseudo-device',
something that sinks or delivers data at an appropriate rate, but
looks like a file, i.e. if you test soundcard software. See the
manpage for examples.
Built-in data creation and sink, no more redirection of /dev/null
and /dev/zero. These special devices speed varies greatly amoung
operating systems, redirecting from it isn't appropriate
benchmarking and a waste of resources anyway.
Accepts 'k', 'm' and 'g' character after number for "kilo, mega,
giga" bytes for overall data size limit.
"gcc -Wall" clean source code, serious effort taken to avoid
undefined behaviour in ANSI C or POSIX, except long long is
required. Limiting and reporting works on data amounts > 4 GB.
cstream was written by Martin Cracauer in 1998. For updates and more in-
formation see http://www.cons.org/cracauer/cstream.html
TCP mode:
- :port bind to local port and await connection
- hostname:port connect to remote machine/port
- hostname:port:hostname:port connect to remote machine/port
192.168.175.48 = 816818368
audio mode option parsing
TCP/IP socket functionality:
- good ifdef's to get rid of it
- good ifdef's to get rid of hostname resolution
- specification for local binding
- Manpage
- usage()
nicht gegen -k linken wenn audio support nicht drin
zlib:
- z <compressionlevel>
negative compressionlevel = bzip2
compressionlevel = - decompress (bzip2 auto-detection)
%%
Current mode durrently doesn't speed up, I probably overlooked some
obvious synchronization.
"Since first transfer" should also exclude the last write (or at least
the close, important on tapes).
Support -B option to set blocksize for writes, if not already set by
-b, which will continue to set both unless -B has been used before.
In concurrent mode, who is going to report what? Parent is easier
handling-wise, but it cannot report output throughput without having
an upward pipe. But we may need such a pipe soon anyway.
Don't use the required blocksize for the pipe in concurrent mode. This
can easily be done if read and write block size are specified
seperately and then just set obs in the parent and ibs in the child to
a useful value (maybe even to be specified by the user, cause it's a
space vs. number of syscalls tradeoff).
Throughput report not only as 'since program started', but also as
'since first read/write succeeded' (also subsctract the amount of data
this syscall took) and 'only take time spent on incoming or outgoing
side into account'.
poll/select:
- poll nur auf lesefd
- danach haben wir einen (teil-)block
1) wenn im puffer noch platz fuer einen block, dann poll auf beide fd
wenn nicht, dann poll nur auf schreibfd
- wenn wir lesefd zurueckkriegen, dann puffer um diesen Block
erweitern
- wenn wir schreibfd zurueckkriegen, dann den pointer im buffer
erhoehen, um das was wir weggeschrieben haben.
- wenn kein Platz mehr zum lesen, dann leerschreiben. Wenn
leergeschrieben und kein platz mehr zum lesen, dann reset
von curread und curwrite
Manpage:
-S
-c 4
-w
This diff is collapsed.
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AWK = @AWK@
CC = @CC@
HAVE_LIB = @HAVE_LIB@
LIB = @LIB@
LN_S = @LN_S@
LTLIB = @LTLIB@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
mkinstalldirs = $(SHELL) $(top_srcdir)/auxdir/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in config.guess config.sub \
install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps auxdir/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = auxdir
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1.1.1 1999/03/30 11:45:17 cracauer Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
EXTRA_DIST = vars.sh test1.sh test1.log1 test1.log2 test1.log3 test1.log4
This diff is collapsed.
Testing with options -c 0
bla
bla
bla
bla
bla
bla
bla
bla
6
0
6
1
1
1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
export PRG=./cstream
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment