On Wednesday 14 December 2005 11:44 am, James wrote: > Boyd Stephen Smith Jr. <bss03 <at> volumehost.com> writes: > > On Wednesday 14 December 2005 07:59 am, Uwe Thiem wrote: > > > does someone know of a piece of software that runs under linux > > > and swallows a stream from a Quicktime Streaming Server but just > > > throws the data away (no decoding, no displaying)? > > > > You may be able to use socat and a bit of shell to do what you > > want: > > Any ability to easily measure the amount of bandwidth being consumed, > in bits/sec or mbps by these video streams ?
You could use pv (pipe viewer) in between socat and /dev/null to measure the bandwidth of the TCP stream. I find nettop is also fairly useful, although it would group all the HTTP streams on that interface into the same numbers. tcpdump is also a tool you may want to check out. Example use of pv: socat "$socat_remote_address" << ENDREQUEST | pv > /dev/null $http_request ENDREQUEST pv is meant to be used interactively, so you'd probably want to start each stream in a separate pty. That should be scriptable with screen. > I have been using 'bwmon: to measure bandwidth consumption > of video streams into an ethernet interface. However,it does not > have the ability to parse out statistics based on individual video > streams, when multiple video streams are entering the same interface. Never used it, so I can't really comment. The pv technique may work for you. Keep in mind that it won't count any overhead, just the throughput of the TCP stream (so, it won't count headers, ACKs, or duplicate packets). Finally, you may be able to use interface aliases and interface monitoring tools to do what you want. You'd just have to figure out a way to have socat use a particular interface. In imaginary land: alias eth0 eth0:$i socat -i eth0:$i TCP:$host:$port << ENDREQUEST > /dev/null & $http_request ENDREQUEST bwmon -i eth0:$i -- Boyd Stephen Smith Jr. [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list