Find the answer to your Linux question:
Results 1 to 10 of 10
Hello I've a dsl modem running on linux. Is it possible to monitor lan clients' bandwith usage via /proc or by a system call? Thanks....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    13

    monitoring lan clients bandwith usage


    Hello

    I've a dsl modem running on linux. Is it possible to monitor lan
    clients' bandwith usage via /proc or by a system call?

    Thanks.

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    are you running a linux router?

  3. #3
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    If you want a whole network look, or what to see say over time, I'd suggest using ntop

    Welcome to ntop.org

  4. #4
    Just Joined!
    Join Date
    Nov 2005
    Location
    iran-esfahan
    Posts
    2
    Dirty solution is add iptables rul and see it counter
    iptables -A INPUT -p ip -j ACCEPT
    with
    iptables -L INPUT -v
    you can see your download
    and zero counter with
    iptables -Z INPUT

  5. #5
    Just Joined!
    Join Date
    Feb 2008
    Posts
    7
    try mrtg...

  6. #6
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    I don't believe mrtg or iptables would be his option as it cannot give you information (at least not in this way) how much rx/tx has a lan client. iptables could work as you can create rules that match the ip addresses of the clients you want to monitor and then you can derive with the above way which client transferred what. But still you loose the information when it happened. So you cannot track down the usual behaviour of users. You would need to check for it in a regular basis and calculate diffs.

    Here my idea: maybe there is a plugin for collectd?

    Anyway. To see a realtime usage, which could be enough if you want to know why your DSL is so slow, ntop is your choice.

    If you find a solution which integrates into openwrt/collectd or a snmp based tool that can run on a server within the network, let me know it!

  7. #7
    Just Joined!
    Join Date
    Feb 2008
    Posts
    7
    how about using iftop or iptraf ?

  8. #8
    Just Joined!
    Join Date
    Jan 2009
    Posts
    13
    My only goal is not just getting statistics about the router but getting information about the per client usage.
    I have little knowledge about the Linux Kernel and networking, sorry if I ask too weird questions. Is it possible to write a kernel module that collects information about per client (per Mac address) usage? It switches the packets to the clients, so it can count how many packets it switched to MAC1, MAC2, MAC3, etc...
    Am I wrong?

  9. #9
    Just Joined!
    Join Date
    Jan 2009
    Posts
    13
    Quote Originally Posted by coopstah13 View Post
    are you running a linux router?
    yes, I use a linux dsl router.

  10. #10
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    start it a start here:

    google "collectd plugin IPTables"

    collectd DOT org/wiki/index.php/Plugin:IPTables

Posting Permissions

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