6

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.

1 Answer 1

3
+50

Following the third section of this guide provided me with all of the information listed in the post, minus latency. Given that you said you already had measuring latency figured out, I assume this isn't an issue.

Logging this to csv/json/whatever is pretty easy, as all of the information is stored in panda data frames.

As this shows the time the process was created, you can use datetime to generate a new timestamp at the time of logging.

I tested this by logging to a csv after the printing_df variable was initialized, and had no issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.