peter-hst / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

network_io_counters not parsing /proc/net/dev properly if no space after interface name #263

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have server with no space after interface name in /proc/net/dev output
2. Run get_io_counters(pernic = True)
3. Output will have nic names like eth0:4046496815 and values will be off

What version of psutil are you using? What Python version?
Python 2.7, psutil 0.4.1

On what operating system? Is it 32bit or 64bit version?
Debian 6.0.4, 64bit

Example /proc/net/dev output:

xeross@content:~$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 9477513   53050    0    0    0     0          0         0  9477513   53050    0    0    0     0       0          0
  eth0:4046496815 27661328    0    0    0     0          0         0 61800195044 32419766    0    0    0     0       0          0

Original issue reported on code.google.com by xer...@theelitist.net on 6 May 2012 at 3:01

GoogleCodeExporter commented 8 years ago
This looks like a duplicate of issue 248 which is already fixed in the 
development trunk.

Original comment by g.rodola on 6 May 2012 at 7:58

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 9 May 2012 at 5:29