Python Forum
psutil network speed stuck
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
psutil network speed stuck
#1
Hi everyone. For a test bench, I'm trying to write a simple piece of code that monitors the network speed on a specific adapter. I'm running on Windows and decided to use psutil. Below the code

import psutil

Net = psutil.net_if_stats()
print(Net)
And below the output:

Output:
{'Ethernet': snicstats(isup=False, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=0, mtu=1500), 'Connessione di rete Bluetooth': snicstats(isup=False, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=3, mtu=1500), 'VirtualBox Host-Only Network': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=1000, mtu=1500), 'Loopback Pseudo-Interface 1': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=1073, mtu=1500), 'Wi-Fi': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=72, mtu=1500), 'Connessione alla rete locale (LAN)* 1': snicstats(isup=False, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=0, mtu=1500), 'Connessione alla rete locale (LAN)* 10': snicstats(isup=False, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=0, mtu=1500)}
Now, I'm on my laptop and would like to measure the wifi speed for now, on the final computer it won't have WiFi so it'll be the LAN network. My problem with the output above is as below:

Error:
'Wi-Fi': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=72, mtu=1500)
Doesn't matter how many times I refresh the code and how much traffic I generate, the speed is stuck on 72. What can be the issue? Please note that I'm downloading files at over 1.5 MB/s.

Thanks
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020