Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psutil.net_io_counters() return same value every time on some machines #551

Closed
EvinceMoi opened this issue Nov 20, 2014 · 7 comments
Closed

Comments

@EvinceMoi
Copy link

It's weird that the same code psutil.net_io_counters() works on my dev machines(win7 x64) but doesn't work on some other machines that has the same OS as the title says.
I've done some investigation that the NIC on the failed system seems to be nothing abnormly, and it has about 20Mbps network io though one NIC.
Is it something relates to runtime?


Python version: 3.4.2

@EvinceMoi
Copy link
Author

More investigation below:
if

when psutil.net_io_counters() gets called, it just returns me the value(600, 608), ignore the above(4251604250, 3657561882), I've studied the related code and doubt the reason of this bug is probably the dirty hack

@EvinceMoi
Copy link
Author

now I'm pretty sure that the problem is caused by the NIC name which is not all-regular-ascii-characters composed, after changing the NIC name to plain ascii characters, it works like a charm.

The dirty hack actually not work well(maybe sometimes return the wrong data), I'm sorry that I'm not good at character codec manipulation and cannot contribute, hope someone else to fix it.

@giampaolo
Copy link
Owner

OK, I think I have fixed this in ac0da3f. Are you able to compile psutil on Windows and tell me if the issue is actually fixed?

@EvinceMoi
Copy link
Author

Tried but couldn't work it out, failed to build psutil just like what you mentioned in INSTALL.rst, using win7 64 bit, vs2013, python 3.4 64bit

@giampaolo
Copy link
Owner

If you give me your email I can send you a pre-compiled exe installer for Python 3.4 64 bit.

@EvinceMoi
Copy link
Author

baneyue#gmail.com, just came back from Spring Festival and happy new year

@giampaolo
Copy link
Owner

New releases/installers were released in the meantime. I think this should have already been fixed by now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants