Closed GoogleCodeExporter closed 9 years ago
Thanks, fixed in r1255.
Original comment by g.rodola
on 30 Jan 2012 at 12:14
Original comment by g.rodola
on 30 Jan 2012 at 12:18
Thanks for your prompt attention to the issue. And thanks for your work on
psutil it is a life saver.
Original comment by andrew.c...@gmail.com
on 30 Jan 2012 at 2:05
I am attaching a change to the logic in the path. I noticed a case where there
is both space (as well as not space) between the name and the stats on the line.
Logic should be:
1) split the line by ":" to get the device and the remaining values.
2) strip() any spaces on the device
3) split() the remaining items on the line to get sent and received values.
# 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: 523965 1544 0 0 0 0 0 0 523965 1544 0 0 0 0 0 0
eth0:699498750 762615 0 1650 0 0 0 0 69956705 301025 0 0 0 0 0 0
###################
for line in lines[2:]:
name, remainder = line.split(':')
name = name.strip()
fields = remainder.split()
bytes_recv = int(fields[0])
packets_recv = int(fields[1])
bytes_sent = int(fields[8])
packets_sent = int(fields[9])
Original comment by jklingin...@gmail.com
on 4 May 2012 at 4:43
AFAICT the current logic covers both cases, this one:
"eth0:699498750 762615 0 1..."
...and this one:
"eth0: 699498750 762615 0 1..."
Are you proposing this change because you noticed that the first number
(699498750) gets truncated or something?
Original comment by g.rodola
on 4 May 2012 at 10:03
I pulled _pslinux.py from the trunk. It resolved the issue I was seeing. I was
seeing my issue from the patch attached to issue. Sorry for the confusion.
Original comment by jklingin...@gmail.com
on 4 May 2012 at 11:39
Issue 263 has been merged into this issue.
Original comment by g.rodola
on 9 May 2012 at 5:29
0.5.0 is finally out. Closing out as fixed.
Original comment by g.rodola
on 27 Jun 2012 at 6:54
[deleted comment]
Updated csets after the SVN -> Mercurial migration:
r1255 == revision cd7a6abcdb20
Original comment by g.rodola
on 2 Mar 2013 at 12:06
Original issue reported on code.google.com by
andrew.c...@gmail.com
on 30 Jan 2012 at 11:38Attachments: