chjwang / psutil

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

disk_io_counters not show flash disk #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. connect my usb flash disk
2.run: psutil.disk_io_counters(perdisk=True)

What is the expected output?

{'PhysicalDrive2': iostat(blablabla), 'PhysicalDrive1': iostat(blablabla), 
'PhysicalDrive0':iostat(blablabla)} 

What do you see instead?

{'PhysicalDrive1': iostat(blablabla), 'PhysicalDrive0':iostat(blablabla)} 

What version of psutil are you using? What Python version?

psutil:0.4
python 2.7

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

Windows XP 32bit (guest on VirtualBox)

Please provide any additional information below.

Screenshot that shows the problem:
http://dl.dropbox.com/u/1320617/Linux_Photos/win_psutil_winobj.jpeg

Original issue reported on code.google.com by kotsifi on 5 Dec 2011 at 11:40

GoogleCodeExporter commented 8 years ago
Comment entered by Jay in r1234 seems reasonable.
Jeremy? Comments?

Original comment by g.rodola on 6 Dec 2011 at 7:33

GoogleCodeExporter commented 8 years ago
Yeah, I meant to update this issue the other day but got sidetracked. I went to 
test this on my VMWare Fusion Windows 2003 system and discovered that 
disk_io_counters(perdisk=True) returns an empty dict for me. Obviously that's 
not correct as there are valid disks on my system, and winobj shows 
PhysicalDisk0 etc.

I'm not sure what's going on but it looks to me like the PhysicalDisk0 is 
returning an invalid handle and hits the break statement, short circuiting the 
rest of the iteration. Question I guess is why the invalid handle would be 
getting received and what if anything can we do about it. 

Original comment by jlo...@gmail.com on 6 Dec 2011 at 8:07

GoogleCodeExporter commented 8 years ago
Why the invalid handle would be getting received and what if anything can we do 
about it? :D

Original comment by kotsifi on 8 Dec 2011 at 12:47

GoogleCodeExporter commented 8 years ago
Jay can you look into this on your 2003 box?
I can't reproduce the problem you're descripbing on Win XP/7.

Original comment by g.rodola on 6 Mar 2012 at 12:55

GoogleCodeExporter commented 8 years ago
I should have fixed this in r1569.
Since there's apparently no way to figure out how many drives we should expect 
I set a maximum of 32 iterations, which is higher than the number of letters in 
the alphabet (A:\ -> Z:\, aka 26 possibilities).
kotsifi, Jay: if you guys have the possibility to confirm this is fixed (I 
don't as I couldn't reproduce the issue in the first place) please confirm, 
otherwise I'm going to assume this is fixed.

Original comment by g.rodola on 26 Feb 2013 at 11:00

GoogleCodeExporter commented 8 years ago
Issue 351 has been merged into this issue.

Original comment by g.rodola on 26 Feb 2013 at 11:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r1234 == revision 2e132af492b5
r1569 == revision 71bd74c64344

Original comment by g.rodola on 2 Mar 2013 at 12:05

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 8 Apr 2013 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 11 Apr 2013 at 9:17

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 12 Apr 2013 at 6:21