LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Possible to monitor data transfer by process in Debian? (https://www.linuxquestions.org/questions/linux-networking-3/possible-to-monitor-data-transfer-by-process-in-debian-4175682545/)

bigfuzzydog 09-22-2020 08:15 PM

Possible to monitor data transfer by process in Debian?
 
I have a bit of an unusual problem.

Our internet access is via a hotspot on my phone (an old plan with "unlimited" data, which in real life means 15gb at high speed and then unlimited s-l-o-w data), and for the past few months we've had an unusual pattern with the data use.

On the 22nd of each month, when Verizon restarts our data allowance for the month, my computer starts to use data at an astronomical rate. It was even more pronounced today than usual: without meaning to watch any videos (although I read some news sites with auto-loading videos, so there's that), nor streaming any audio, nor downloading anything to speak of (a few PDFs, a couple mb each) my phone is telling me I went through 4.4gb of data in maybe 3 hours, of which I spent at least half of the time writing an article.

It goes like this until the 15gb of "high-speed data allowance" is gone, but once that's gone, suddenly the same sites I normally use don't use unusual amounts of data at all.

At one point I'd experimented with a VPN that let me monitor data transfer rates, and it seemed that the 80k/sec (!) that was getting transferred went to almost zero after closing one particular shopping site, so I figured it had been that site. But I wasn't there today at all, and 4.4gb of data. Nobody else in the house was using internet at the time.

It doesn't seem to be the phone, since I can use my wife's computer or my spare machine and the data usage is normal.

So: is there any way for me to monitor data transmission, by process, to try to figure out what's going on with my main machine? I'm wondering if there's something hinky going on, both because of this and because it's developed a few quirks - for example the login screen had gone from pretty much instantaneous (on waking the computer from sleep mode) to taking 8-10 seconds to show up, then back to showing up right away.

Thanks in advance!

lucmove 09-23-2020 01:46 AM

I don't know how to monitor data consumption by process, but I know this:

Code:

$ vnstat -i [network interface]
Run 'ifconfig -a' to find out what your network interface is. For example, an Ethernet cable connection usually is eth0.

Also, open the file /etc/vnstat.conf and look for this line:

Code:

# on which day should months change
MonthRotate 22

22 is because you say your allowance restarts on the 22nd of each month.

You can also run this

Code:

$ watch -c "vnstat -i [network interface]"
and watch it kind of in real time.

You can also run 'nestat -nap' and get some vague information.


All times are GMT -5. The time now is 01:59 AM.