Polling eth0?

Discussion in 'Python' started by Dennis Craven, Apr 28, 2004.

  1. Hello,

    I intend on writing a small application that monitors incoming/outgoing
    traffic on eth0, and recording the bandwidth usage with monthly
    totals etc..

    Where would be a good place to start in regards to connecting to
    eth0 and reading such data? I am somewhat familiar with Python, and
    its simple constructs, but I'm not so familiar with this network
    aspect.

    Any particular modules/examples/documentation/tutorials that I should
    start out reading?

    Thanks,
    ~djc
    Dennis Craven, Apr 28, 2004
    #1
    1. Advertising

  2. Dennis Craven

    Peter Hansen Guest

    Dennis Craven wrote:

    > I intend on writing a small application that monitors incoming/outgoing
    > traffic on eth0, and recording the bandwidth usage with monthly
    > totals etc..
    >
    > Where would be a good place to start in regards to connecting to
    > eth0 and reading such data?


    I would most definitely do this with appropriate calls to "iptables",
    specifically using the -Z option with -L, which is designed specifically
    for this kind of thing.

    (If you aren't familiar with it, it's a Linux firewall command, not
    anything to do with Python. You could use os.popen() to call it
    from Python though, and capture the output.)

    -Peter
    Peter Hansen, Apr 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roz Lee

    Re: connection polling

    Roz Lee, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,287
  2. ker beroz

    Re: connection polling

    ker beroz, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    387
  3. Natty Gur

    Re: connection polling

    Natty Gur, Jul 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    360
    Natty Gur
    Jul 10, 2003
  4. Kerberoz

    Re: connection polling

    Kerberoz, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    401
    Natty Gur
    Jul 10, 2003
  5. Kerberoz

    Re: connection polling

    Kerberoz, Jul 10, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    504
Loading...

Share This Page