I am using Python 3.4 on a Linux PC. I have written a program to access ftp page using ftplib module and download a file from it on my pc. 
I want to know the total network data transfer (including both sent and received) that happened in this process? 
How should I go about it?
Any leads will be helpful.
Use wireshark, you have to setup a filter for ftp (filter like: port ftp). Then
start sniffing the transfer traffic. When the transfer is done you can see the
captured packets in the main window. You have to right click on the first ftp packet
and then select "Follow TCP stream". Then you should be able to view all your transfered
bytes and such. This works also with tcpdump and such but it is commandline only. 
Kind regards,
Dirk
Get data transfered in Python Modules