To look at some details regarding a ppp connection, one can run the following command:
$ ifconfig ppp
ppp0 Link encap:Point-to-Point Protocol
inet addr:197.108.58.82 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:479 errors:0 dropped:0 overruns:0 frame:0
TX packets:479 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:68118 (68.1 KB) TX bytes:32771 (32.7 KB)
In order to check if there is any data transfer, one can re-run that command, while paying attention to RX packets and TX packets to see if there is a change (maybe there's a better way of doing this?).
Anyways, I could do the same with Python, but it's cumbersome (using subprocess, and then parsing the output), so am wondering if there's a better way. I would have loved to use netifaces for this, but it provides more limited info:
$ python -c "import netifaces; print netifaces.ifaddresses('ppp0')"
{2: [{'peer': '10.64.64.64', 'netmask': '255.255.255.255', 'addr': '197.108.58.82'}]}