bwm-ng v0.4
Copyright (C) 2004 Volker Gropp (bwmng@gropp.org)
http://www.gropp.org

What is this?
-------------

This was influenced by the old bwm util written by ...... (couldnt find any 
author, debian package: bwm Maintainer: Lenart Janos <ocsi@debian.org>) which 
had some issues with faster interfaces and was very simple. Since i had almost
all code done anyway for other projects, i decided to create my own version.

I actually dont know if netstat input is usefull at all. I saw this elsewhere,
so i added it. Its target is "netstat 1.42 (2001-04-15)" linux or FreeBSD.
If there are other formats i would be happy to add them.

For info about libstatgrab please refer to http://www.i-scream.org/libstatgrab/


Platforms
---------

Tested and running on:
Linux 2.4, Linux 2.6
freeBSD 4.8, freeBSD 5.3
MacOS X 10.3 (10.2 getifaddrs fails)

please notify me of working or not working platforms.

INSTALL
-------

./configure
make

to install use as root: 
make install


Specs
-----

csv output format: 
unix timestamp;iface_name;bytes_out/s;bytes_in/s;bytes_total/s;packets_out/s;packets_in/s;packets_total/s;errors_out;errors_in\n
Use --count 0 to skip the all zero output after start.

html output format:
edit the bwm-ng.css to modify the output. Please note the htmlrefresh only 
modifies the META refresh, you maybe wanna sync --timeout and --htmlrefresh


USAGE
-----

USAGE: bwm-ng [OPTION] ... [CONFIGFILE]
Options:
  -t, --timeout <msec>    displays stats every <msec> (1msec = 1/1000sec) default: 500
  -d, --dynamic           show values dynamicly (Byte KB or MB)
  -a, --allif             show also down interfaces
  -p, --packets           show packets/s instead of KB/s
  -I, --interfaces <list> show only interfaces in <list> (comma seperated)
  -D, --daemon            fork into background and daemonize
  -h, --help              displays this help
  -V, --version           print version info

Input:
  -i, --input <method>    input method, one of: netstat proc libstatgrab
  -f, --procfile <file>   filename to read raw data from. default: /proc/net/dev
  -n, --netstat <path>    use <path> as netstat binary

Output:
  -o, --output <method>   output method, one of: plain, curses, csv, html
  -C, --csvchar <char>    delimiter for csv
  -F, --csvfile <file>    output file for csv (default stdout)
  -H, --htmlrefresh <num> meta refresh for html output
  -H, --htmlheader        show <html> and <meta> frame for html output
  -c, --count <num>       number of query/output for plain & csv (ie 1 for one single output)

Keybindings (curses only):
  'q'     exit
  '+'     increases timeout by 100ms
  '-'     decreases timeout by 100ms
  'k','d' switch KB and auto assign Byte/KB/MB
  'a'     switch show all interfaces or only those which are up
  'n'     cycle input methods
  'p'     switch show packets or Byte/s
	

Configfile
----------
either via cmdline or /etc/bwm-ng.conf or ~/.bwm-ng.conf
it consists of;
longoption=value
with 1 or 0 as values for keys without a value in cmdline options.


Misc
----

Bugs:
  - configure detects getifaddrs, but doesnt work in MacOS X 10.2 or earlier
  - no other yet, wow ;) (please report if you found one)
 
Todo:
  - Docs and manpage
  - try to avoid kmod, like net-tools do, for socket() for ioctl
  - print correct error string (strerror)
  - show the avg of last x seconds (like load avg in uptime)
  - sum and show amount of bytes since startup (NOT bytes per sec)
  - mysql output
  - whatever you can think of


 ******************************************************************************
 *  This program is free software; you can redistribute it and/or modify      *
 *  it under the terms of the GNU General Public License as published by      *
 *  the Free Software Foundation; either version 2 of the License, or         *
 *  (at your option) any later version.                                       *
 *                                                                            *
 *  This program is distributed in the hope that it will be useful,           *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
 *  GNU General Public License for more details.                              *
 *                                                                            *
 *  You should have received a copy of the GNU General Public License         *
 *  along with this program; if not, write to the Free Software               *
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
 ******************************************************************************
