bwmonitor and bwbar
===================

Written by:   H. Peter Anvin <hpa@transmeta.com>
Packaged by:  Jim Pick <jim@jimpick.com>

Available at:

  http://www.kernel.org/pub/software/admin/bwmonitor/
  ftp://ftp.kernel.org/pub/software/admin/bwmonitor/

Or at any kernel.org mirror site.

For installation instructions, read the INSTALL file.


-- bwmonitor --

bwmonitor is a small application for monitoring bandwidth usage on an
interface.  Every second, it will read /proc/net/dev for an interface,
and print out three pieces of data on stdout - the time (in seconds),
the number of bytes sent out on the interface, and the number of bytes
received on the interface.  eg.

$ bwmonitor eth1
951707182 8518320 685592
951707183 7787664 336624
951707184 7632896 229840
951707185 8298736 298048

Of course, in order for this to work, you'll need to be running Linux,
and have /proc mounted, with networking and proc filesystem support
enabled in the kernel.


-- bwbar --

bwbar is another small application that will repeatedly read
/proc/net/dev every 15 seconds, and create a small PNG graphic
suitable for embedding in a web page.  It creates the files
'ubar.txt' and 'ubar.png' in the current directory from
which it is run.  It also uses the temporary files 'ubar1.txt'
and 'ubar1.png' in the current directory.  You'll need
to have perl, pnmtopng, and netpbm installed (which can be
found in most Linux distributions).

An example of how to run it would be:

$ nohup bwbar > /dev/null &

This will put the program in the background, and it will create the
files in your current directory.

Kernel.org uses it on it's home page.  The HTML fragment (using
Apache's server-side includes feature) looks like:

<CENTER>
<FONT SIZE="-1">
<!--#include virtual="ubar/ubar.txt" -->
</FONT>
<BR>
<IMG SRC="ubar/ubar.png" ALT="Bandwidth utilization bar" WIDTH=600 HEIGHT=4 BORD
ER=1>
<!-- The bandwidth bar program is available at: http://www.kernel.org/pub/software/admin/bwmonitor/ -->
</CENTER>


--

If you any questions or patches, feel free to send email to Jim Pick
<jimpick@kernel.org>.



