Friday, 18 January 2013

bwm-ng csv fields

Needed to check bandwidth usage on a server today using a script, thought of running bwm-ng, it might be time for them to change the ng to nng - new next generation as it does need some work...

To generate csv: bwm-ng -I wlan0 -o csv -c 1 -T rate

The fields it produces are hidden in some "README" not readily available as it's with the source code, anyhow the details of the fields:

Unix Timestamp
Interface Name
Bytes Out
Bytes In
Bytes Total
Packets Out
Packets In
Packets Total
Errors Out
Errors In

Fields are split by ; character but this can be changed using the -C option...

3 comments:

  1. hmm i see six fields beyond what you have. Any idea what they are?

    ReplyDelete
    Replies
    1. I don't but can find out for you, what version of bwm-ng are you using?

      Delete
  2. Quickly took a look for you, the details are:

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

    ReplyDelete