简体   繁体   English

如何在Windows中使用python获取进程网络使用情况?

[英]How to get process network usage in Windows in python?

I'm using Python 2.7 and Windows 7 (but I need it to work on at least XP as well). 我正在使用Python 2.7和Windows 7(但至少在XP上也需要它)。

How can I get the percentage of the network bandwidth used by my program written in Python? 如何获得用Python编写的程序使用的网络带宽的百分比? So if the internet speed is 20 Mbit/s, and my program is connecting to the web at a "full speed", it'd write 100%, etc. 因此,如果Internet速度为20 Mbit / s,并且我的程序以“全速”连接到Web,则它将写入100%,依此类推。

Thanks in advance! 提前致谢!

You would need to develop a windows network driver with such capability. 您将需要开发具有这种功能的Windows网络驱动程序。

Check the related answer at: Monitor a process's network usage? 在以下位置查看相关答案: 监视进程的网络使用情况?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM