Measuring bytes of packet sent from python application

alex goretoy aleksandr.goretoy at gmail.com
Mon Jan 5 18:45:23 EST 2009


Have you looked into scapy?

www.secdev.org/projects/*scapy*/

There's another one, it comes with python I think. Can't seem to remember
the name. I may be mistaken though.

-Alex Goretoy
http://www.alexgoretoy.com
somebodywhocarez at gmail.com


On Mon, Jan 5, 2009 at 11:23 PM, Kangkook Jee <aixer77 at gmail.com> wrote:

> Jonathan Gardner wrote:
>
>> On Jan 5, 2:26 pm, Kangkook Jee <aixe... 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?
>>>
>>> I tried to do this by tracing some socket calls (send, sendto, sendAll)
>>>  using 'metaclass' but I could find exactly place that I can put this in.
>>>
>>> My application runs some number of protocols (bittorrent, xmlrpc ..) in
>>> it and will be measured for a couple of hours.
>>>
>>>
>> A good universal tool on the Linux platform is tcpdump. It takes some
>> learning, but is very useful for this kind of task. You can use a tool
>> like ethereal to visualize the data that tcpdump gathers.
>>
>
> Thanks a lot Jonathan
>
> That seems like a good solution for my issue but how can I distinguish
> traffics from my application to others?
>
> I'm still struggling to solve it within python process since it looks
> cleaner but it doesn't seems to be easy at all.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090105/64ccb574/attachment-0001.html>


More information about the Python-list mailing list