 _        ___  ____ _  _  ____  ___
| '-----./ _ \/ __/| || ||  _ \/ _ \
| /| /| |  __/\__ \| || || '  /  __/
|_||_||_|\___\/___/\____/|_|\_\\___\  ( documentation )


mesure is a tool to measure streams of bytes from different sources.

Maybe showing some examples you'll understand better some concepts.

Supose that you'r tranfering a file between two boxes using netcat, but
you want to know how many KB/s are your sending. You can use ifstat or
another tool to mesure it, but this will not get only your netcat
connection. The solution is easy with mesure:

	$ cat file | mesure -aKz | netcat remotehost remoteport

By the same way you can use the same concept in the remote box.

Lets take a look on the mesure flags used here:
	-a : average
		This flag tells mesure to mesure average transfers (-t is implicit)
	-K : mesure transfer in KB/s
	-z : read stream from stdin.

If you want to mesure passively the traffic in your wlan network try:
# ifconfig ath0 promisc
# mesure -i ath0 -atKv

If you'r trying to mesure the traffic of a wireless ciphered network (p.e WEP)
without password, you must do something like that:
# iwconfig ath0 mode monitor
# mesure -e ath0 -atKv

Note the '-e' flag instead of '-i', because ciphered packets in monitor mode
are classified as 'error' ones.


If you want to mesure the bandwidth that you'r using foreach icecast streaming
connection you can dump the stream in a file and mesure't using this line:
$ mesure -tKva -s 5 -f /tmp/file.ogg

The same concept can be applied to files, discs, memory, interfaces, etc.

Some silly examples:
====================
>> Shows the number of bytes received by 'eth0' and the transfer rate.
$ mesure -ni eth0 | tee /dev/stderr | mesure -ZDatvn
0 B/s               
116315              
0 B/s               
116375              
30 B/s              
118788              
1.221 B/s           
122850              
2.641 B/s           
122850              
1.320 B/s           

>> Measures the transfer for input and output bytes from the 'eth0' interface.
$ ./mesure -ni eth0 | ./mesure -ZZDvto eth0

>> Shows the sizes of all files in the current directory
$ ls -l | awk '{print $5}'| mesure -Zn

- this seems stupid, but scripting a bit, you can use mesure to check if the
size of any file has changed.
