Bandwidth monitoring using python

Thread Tools Search this Thread
Top Forums Programming Bandwidth monitoring using python
# 1  
Old 08-30-2011
Bandwidth monitoring using python

I wish to develop an application to monitor the network traffic of my system.

I wish to know which computer networked to me is using most of the bandwidth. I know the basics of python but do not know how to start the work.. please suggest some good methods to follow.
# 2  
Old 09-01-2011
Well, looking for the input is first order of business, not a programming matter, more system sw for your flavor. If you have firewall sw, it may be logging all packets. Network sw might log all packet headers. What is your platform?
# 3  
Old 09-02-2011
ubuntu 10.10, 2.6.35-29-generic. Can such a method also be implemented to detect the network traffic through a router..

Also is it possible to read the header information of packets going to that system..

Last edited by coderhs; 09-02-2011 at 11:57 PM.. Reason: wanted to add another question to the pervious.
# 4  
Old 09-05-2011
If you are running on a router, there are ways to log all packets, or to be called for every packet, but often if they do not have a logging feature, you need to install a firewall just to do the logging. Now, remotely, on telnet accessible hard coded routers, not so easy.

If you get a product for snooping the net, it turns your lan card to promiscuous and you see all traffic on the local lan segment/collision domain. If you are on a switch, bridged cd or smart hub, it may mask packets from you.
# 5  
Old 09-06-2011
Perhaps I'm off topic. But did you check if such tool already exist? iftop comes for instance to my mind.

# 6  
Old 09-11-2011
I am a beginner in programming for network application, wish to learn how it can be achieved..

Thanks for the suggestion of iftop application..
# 7  
Old 09-11-2011
Alright, fair enough. This is IMHO a good project to start and learn.

It has been a long time I've done this, but unless my memory is defective, you'll definitely need to learn about libpcap. Since you're aiming at programming in python - which is too an excellent idea - you should consider pylibpcap or similar (google for libpcap python).

Just my 2c,
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies

2. UNIX for Beginners Questions & Answers

Python for monitoring apache and restarting if down

Are there any existing python module for service monitoring? For example apache service? (1 Reply)
Discussion started by: ctrld
1 Replies

3. IP Networking

Bandwidth montor

Hi all I have been running iptraf on a linux box for a few months monitoring bandwidth utilization realtime from mac address with port mirroring. Now I want to graph these bandwidth utilization. Is MRTG the right software? Any ideas? (4 Replies)
Discussion started by: palm101
4 Replies

4. IP Networking


Hi, 1-What is bandewidth ? 2-How to calculate ? 3-How to measure ? Any free software to measure it ? Many thanks. (4 Replies)
Discussion started by: big123456
4 Replies

5. UNIX for Advanced & Expert Users

Bandwidth monitoring

Hi Gurus, Need to have a way to monitor Bandwidth utilization on Linux servers, running squid . Have worked on 3rd party monitoring tools like Bandwidth d, Nagios etc. But we are working to find out a way to monitor this through Sitescope, for which we need to find a file where the... (4 Replies)
Discussion started by: Crazy_murli
4 Replies

6. UNIX for Dummies Questions & Answers

Bandwidth Monitoring.

Hi, I'm looking for some way to bring up in a shell window a realtime (or something that updates at 10 second intervals or whatever) bandwidth monitor. I just want something that shows me how much kbps is going in and how much is going out of each interface. Is there something that might... (2 Replies)
Discussion started by: d11wtq
2 Replies

7. UNIX for Advanced & Expert Users

AFP & FTP Bandwidth Monitoring?

Is there a way to monitor FTP and AFP bandwidth on a per user basis? AFP = AppleFilesharingProtocol, and by monitor, I don't mean graphs, I mean getting raw byte counts I can use in my scripts any way I choose. I am attempting to use mod_watch to monitor virtual domain bandwidth usage, but I really... (0 Replies)
Discussion started by: l008com
0 Replies

8. UNIX for Dummies Questions & Answers

User Bandwidth Monitoring

What are my options for monitoring bandwidth on a per user basis? Ideally, I'd like something thats easy to configure (like a webmin module pleeeease?), and that could monitor ALL bandwidth. Not just web bandwidth but also ftp/afp uploading and downloading, and email traffic. I know this is a... (4 Replies)
Discussion started by: l008com
4 Replies

9. IP Networking

Bandwidth Caping With PF

i have two questions actually... i need to block certain ports with openbsd and PF in a large lan, the firewall is supposed to be a router between the internet and the first lan switch. first of all, would this work at all in theory? second, i tried doing this a few days ago at a huge lan but i... (2 Replies)
Discussion started by: nocturnal
2 Replies
Login or Register to Ask a Question