Sunday, 22 May 2022

How to monitor per-process network usage in Python?

I'm looking to troubleshoot my internet issue so I need a way to track both my latency and which application is using how much network bandwidth.

I've already sorted out checking latency, but now I need a way to monitor each process' network usage (KB/s), like how it appears in Windows Task Manager.

Before you suggest a program, unless it's able to record the values with a timestamp then that's not what I'm looking for. I'm asking for a Pythonic way because I need to record the network bandwidth and latency values at the same time so I can figure out if a specific process is causing latency spikes.

So here's the info I need:

Time | Process ID | Process Name | Down Usage | Up Usage | Network Latency |

Also, please don't link to another Stackoverflow question unless you know their solution works. I've looked through plenty already and none of them work, which is why I'm asking again.



from How to monitor per-process network usage in Python?

No comments:

Post a Comment