Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I need to record Tx/Rx bw in my c program at defined intervals. I am aware that there a bunch of available tools but I need a minimal version ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    17

    Post Recording bw usage!


    Hello,

    I need to record Tx/Rx bw in my c program at defined intervals. I am aware that there a bunch of available tools but I need a minimal version with only Tx/Rx bw with no other details. I have tried the tool bwm-ng which mostly serves my purpose but either it runs continuously in the console or saves result in html file. It does not have any options to save the result in txt file which could have been easy to parse.
    Is there any other simple way to record Tx/Rx bw in a program?(without using tools from /proc/net/ or any)
    I am using Mandriva Linux 2.6.31.5

    Thanks!

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    if you have a (x)html you can xsl transform it into whatever you want as long the structure of the document is predictable.

  3. #3
    avb
    avb is offline
    Just Joined!
    Join Date
    Mar 2011
    Posts
    3
    ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1
    ifconfig eth0 |grep bytes|cut -d":" -f3|cut -d" " -f1

    this commands shoud give you information about rx and tx data on eth0, for example.

    Also take a look on rrdtool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •