Measuring bytes of packet sent from python application
Grant Edwards
grante at visi.com
Mon Jan 5 21:14:26 EST 2009
On 2009-01-05, Kangkook Jee <aixer77 at gmail.com> wrote:
> I'd like to measure number of bytes sent(or recv'd) from my
> python application. Does anyone have any idea how can I
> achieve this?
Aside from tcpdump/wireshark, you can set up iptables rules to
enable accounting for traffic based on IP addresses and ports.
http://wiki.openvz.org/Traffic_accounting_with_iptables
http://www.faqs.org/docs/linux_network/x-087-2-accounting.ipfwadm.html
http://www.catonmat.net/blog/traffic-accounting-with-iptables/
--
Grant
More information about the Python-list
mailing list