By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

Polling eth0?

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.