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

interfaces with ':' in name break network_io_counters #435

Closed
giampaolo opened this issue May 23, 2014 · 7 comments
Closed

interfaces with ':' in name break network_io_counters #435

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From john.pan...@gmail.com on September 25, 2013 09:26:17

Following line in /proc/net/dev breaks psutil:
'bond0:1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n'

Original issue: http://code.google.com/p/psutil/issues/detail?id=435

@giampaolo
Copy link
Owner Author

From john.pan...@gmail.com on September 25, 2013 00:27:47

Solution:

_pslinux.py

-colon = line.find(':')
+colon = line.find(': ')

@giampaolo
Copy link
Owner Author

From g.rodola on September 25, 2013 00:41:43

Do you actually have an interface with that name ("bond0:1") or this is just 
for  extra carefulness?
Regardless, I fixed this in revision 32524621022e .

Status: FixedInHG
Labels: OpSys-Linux Milestone-1.1.0

@giampaolo
Copy link
Owner Author

From john.pan...@gmail.com on September 25, 2013 00:43:03

Yes, this is a real case: https://github.com/Eugeny/ajenti/issues/150 . Thanks 
for the update!

@giampaolo
Copy link
Owner Author

From john.pan...@gmail.com on September 25, 2013 06:42:28

Just found out this doesn't always work. E.g. on Ubuntu 12.04 server, there's 
no space after the colon. Changing find(': ') to rfind(':') should help.

@giampaolo
Copy link
Owner Author

From g.rodola on September 25, 2013 06:59:15

Right, thanks. Done.

@giampaolo
Copy link
Owner Author

From g.rodola on September 28, 2013 03:06:18

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on September 28, 2013 10:32:46

Closing out as fixed. Release 1.1.0 is now available for download.

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

1 participant