Find the answer to your Linux question:
Results 1 to 4 of 4
Kernel newbie here....I have multiple ethernet cards (using bonding). Is there any function, fields to check which of these device is the least busy? (least packets queued, least loaded etc?) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    2

    how to find the least loaded/busy ethernet cards


    Kernel newbie here....I have multiple ethernet cards (using bonding). Is there any function, fields to check which of these device is the least busy? (least packets queued, least loaded etc?)

    Which file should I look into for the function that actually transmit a packet?

    Thanks.

  2. #2
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    "~$ cat /proc/net/dev" shows how much bytes, packets, errors, and the like are received and transmitted on every Ethernet device.

    Constantly reading this file, you could make up your own statistics.
    Bus Error: Passengers dumped. Hech gap yo'q.

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    2
    Quote Originally Posted by dilbert
    "~$ cat /proc/net/dev" shows how much bytes, packets, errors, and the like are received and transmitted on every Ethernet device.

    Constantly reading this file, you could make up your own statistics.
    I'm actually writing some kernel code and don't want to keep reading the file, so there is no real-time statistics on the device I can pull from the device struct or something..... I see a tx_queue_len, but that looks like the max. queue length not the current queue length

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    You can read that file with kernel code, too. The proc file system is already maintained by the kernel. So, "/proc/net/dev" should be present in every normal system. I presume the strings in it are standard, too, the same as the whole network stack.
    Many drivers write into this file system, so you could read it from it, too.

    I'm not aware of any other statistics you could use. Maybe someone else knows more.
    Bus Error: Passengers dumped. Hech gap yo'q.

Posting Permissions

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