Skip to content

disk_io_counters failed to find some disks on GNU/linux #338

Closed
@giampaolo

Description

From mani...@gmail.com on November 16, 2012 18:18:38

What steps will reproduce the problem?  
1. Just have some lvm partition on a virtual server (xen in my case) with no 
digit in its name, like this /proc/partitions : 

major minor  #blocks  name

 202        0   19922944 xvda
 202       16    1048576 xvdb 

What is the expected output?  
Any correct result 

What do you see instead?  
RuntimeError: couldn't find any physical disk 

What version of psutil are you using? What Python version?  
psutil 0.6.1 on python 2.6.6 

On what operating system? Is it 32bit or 64bit version?  
GNU/linux debian squeeze, 64 bits, in a xen domU 

Please provide any additional information below.  
The file /proc/diskstats correctly show some informations : 

 202       0 xvda 27846519 29828 1002976690 121876532 13449001 43255546 
453670328 1152982588 0 79363348 1275022004
 202      16 xvdb 55557 1134 453464 412056 38511 33466 575840 1699516 0 272092 2111504

It's not a real physical disk, it's a lvm volume, but the virtual server show 
it as a real disk.

In _pslinux.py , line 322, I can see that to be added as a partition, the name 
of the partition must end with a digit, but that's not always the case. This is the bug.

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

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions