Man Linux: Main Page and Category List


       bwm-ng  -  Bandwidth  Monitor  NG  (Next  Generation), a live bandwidth
       monitor for network and disk io.


       bwm-ng [options] ... [configfile]


       bwm-ng can be used to monitor the current  bandwidth  of  all  or  some
       specific network interfaces or disks (or partitions). It shows total of
       in and  out  as  well  as  total  of  all  interfaces/devices.  Several
       different output methods are supported (curses, curses2, plain, csv and

       bwm-ng is not limited in the number of  interfaces  or  disks  and  can
       handle  new  ones dynamically while its running or hide those which are
       not up.


       The input methods used pretty much depends on your OS and system.   You
       can  choose  the  preferred  method either at start or in curses during
       run-time.  Each method can only be used if  bwm-ng  was  compiled  with
       support for it.

       Currently supported network input methods:

              proc :
                  This  is  the default for Linux based systems. It parses the
                  special procfs file /proc/net/dev. This should be used if in
                  doubt in Linux.

              getifaddrs :
                  This  is  the  default  on BSD systems like FreeBSD, NetBSD,
                  OpenBSD and recent Mac OS X (>=10.3). This should be used if
                  in   doubt   on   those  systems.  It  uses  the  getifaddrs

              kstat :
                  This  is  the  default  for  Solaris.  It  uses  the   kstat

              sysctl :
                  This  is the default on Systems like IRIX and other UNIX. It
                  can be used on many other systems like early  Mac  OS  X  as
                  well. It uses the sysctl systemcall.

              netstat :
                  This  is  a  Backup  for systems without the above, or other

              libstatgrab :
                  bwm-ng can use the external library  libstatgrab  to  gather
                  the      data.     please     refer     to     http://www.i-
         for more info about this.

       Currently supported disk input methods:

                  Shows   the   diskio   on   Linux   2.6+    systems    using
                  /proc/diskstats.   Instead   of   packets   the   number  of
                  read/writes will be shown.

                  same as kstat network input but for disk  io.  It  uses  the
                  kstat systemcall from Solaris.

                  Written  for  NetBSD and OpenBSD, but maybe working on other
                  Platforms aswell.

                  devstat library based input. You can find  this  on  FreeBSD
                  based systems.

                  framework  IOKit  based  input.  You can find this on Darwin
                  systems like MacOSX.

                  same  as  libstatgrab  but  for   disk   io   (http://www.i-


       You  can  select  several different ways to output the data gathered by

       You can use one of:

                  This is the default output method. Usually this fits you the
                  most.   In  curses  mode you can control bwm-ng with several
                  keys.  Press ’h’ for a online help. To quit using this  mode
                  either press ’q’ or ctrl-c.

                  Shows bar charts of the current IO, using curses output.

                  Plain  or  ASCII  is  mostly  a  backup  if  curses  is  not
                  available. You cannot control bwm-ng at all in this mode. To
                  quit  press  ctrl-c.  But for one single single output using
                  this is the mode that fits the best.

                  CSV is designed to use with scripts for easy parsing. For  a
                  list  of those elements please take a look at README - Specs
                  section.  To skip the first output with only zeros use
                  bwm-ng -o csv -c 0

                  This is designed for use in the WWW. It uses  the  CSS  file
                  bwm-ng.css  in  current  working  dir.  "--htmlrefresh" only
                  affects the refresh of the page by  the  browser.  For  best
                  results  use the same value for --timeout and --htmlrefresh.


       The options that are  recognized  by  bwm-ng  can  be  divided  into  3
       different  groups.  The  long  versions  can only be used if bwm-ng was
       compiled with getopt_long.

       These options specify  the  method  to  gather  the  data  as  well  as
       different options for them.

       -i, --input method
              selects  which  method  to  use. It can be one of the above (see
              INPUT METHODS) if support for it was compiled in.

       -f, --procfile filename
              selects the file to parse in proc input method. This is  usually

           --diskstatsfile filename"
              selects  the file to parse in disk input method. This is usually

           --partitionsfile filename"
              selects the file to parse in disk input method on older  Kernel.
              This is usually /proc/partitions.

       -n, --netstat path
              specifies  the  binary  to  execute  for  netstat  input method.
              Because this may be a security flaw support for this  option  is
              not compiled in bwm-ng by default.

       These options select the way to output the data and several options for
       the output.

       -o, --output method
              selects which method to use for output. It can  be  one  of  the
              above (see OUTPUT METHODS) if support for it was compiled in.

       -u, --unit value
              selects  which  unit  to  show.  It  can  be one of bytes, bits,
              packets or errors.

       -T, --type value
              specifies the type of stats to show. Use one  of  rate  for  the
              current rate/s, max for the maximal value achieved since startup
              of bwm-ng, sum for the total sum counted since startup of bwm-ng
              or avg for the average over the last 30 seconds.

       -c, --count number
              number  of  outputs  for  Plain and CSV output mode. Use ’1’ for
              once single output. Using ’0’ in CSV mode will skip first output
              that always consists of zero values.

       -C, --csvchar char
              specifies the delimiter char for CSV mode. The default is ’;’.

       -F, --outfile filename
              specifies  the  use  of a outfile instead of stdout. This option
              only affects CSV and HTML mode.

       -R, --htmlrefresh seconds
              sets the HTML Meta refresh field to seconds in HTML mode.   This
              will  result  in  a  reload  of  the page every n seconds by the
              browser. If this is set you want to use --htmlheader as well.

       -H, --htmlheader [value]
              if this option is used,  bwm-ng  will  print  the  correct  HTML
              header  (<html></html>)  including  Meta fields before and after
              data.  This is only useful in HTML mode. value can be 0 (off) or
              1 (on), if the value is not given ’1’ is used.

       -N, --ansiout
              disable ANSI Codes for Plain output.

              show long realnames of disks in Darwin (ioservice input)

       These options specify the general behavior of bwm-ng.

       -t, --timeout msec
              displays and gathers stats every n msec (1msec = 1/1000sec). The
              default is 500msec.

       -d, --dynamic [value]
              shows bytes and bits with dynamic unit like K,  M  or  G  (Kilo,
              Mega,  Giga).   value  can be 0 (off) or 1 (on), without a value
              ’1’ is used.

       -a, --allif [mode]
              specifies whether only up and selected interfaces (mode=0),  all
              which  are  up but maybe not selected (mode=1) or all, even down
              and not selected interfaces (mode=2). If no interface list given
              (--interfaces) mode=1 and mode=2 are the same.

       -I, --interfaces list
              show  only  interfaces  which  are  in this comma separated list
              (whitelist).  If the list is prefixed by a ’%’  its  meaning  is
              negated  and  interfaces  in  this  list  are hidden from output
              (blacklist). (Example: %eth0,tun0)

       -S, --sumhidden [value]
              if given and the optional value is not 0, count also hidden  and
              not shown interfaces for total value.

       -A, --avglength seconds
              sets the span in which the stats for average mode are collected.
              Default is 30 seconds or 2*timeout.

       -D, --daemon [value]
              fork into background and daemonize if  given  and  the  optional
              value  is  not  0.   This  only  affects  HTML  and CSV mode and
              --outfile is required.

       -h, --help
              show a help of command line options.

       -V, --version
              print version info


       The behavior of bwm-ng can be also  controlled  by  a  configfile.   By
       default bwm-ng first reads /etc/bwm-ng.conf and then ~/.bwm-ng.conf. If
       specified on command line bwm-ng skips those.  It consists of the  same
       long-options as used for command line as keys followed by a ’=’ and the
       value. Lines starting with a # or unknown key will be ignored.

       For example:


       bwm-ng.css the CSS file used for html output.


       bwm-ng.conf-example for an example of the configfile, README for  other
       comments and hints about bwm-ng. for new version or further help and links.


       Volker  Gropp <> wrote bwm-ng and is current maintainer.
       For further Authors please refer to AUTHORS file which should come with

                                  2007-03-01                         bwm-ng(1)