zhengzheng / psutil

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

disk_io_counter(per_disk) returns different name than disk_partitions() #334

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
#Output from disk_partitions() is this:
print disk_partitions()
partition(device='/dev/sda3', ...
partition(device='/dev/sda1', ...
partition(device='/dev/mapper/system-home', ...
partition(device='/dev/mapper/system-opt', ...

2.

# Output from disk_io_counter(perdisk=True) is this:
print disk_io_counter(perdisk=True)
dm-10 iostat(...
dm-9 iostat(...
sda4 iostat(...
sda2 iostat(...
sda3 iostat(...
dm-8 iostat(...
sda1 iostat(...

What is the expected output?
It would be nice to have the same naming conventions for partitions

What do you see instead?
different partition names "dm-10" vs. "/dev/mapper/system-home"

What version of psutil are you using? What Python version?
psutil 0.6.1
python 2.6.8

On what operating system? Is it 32bit or 64bit version?
SLES 11.2, x86_64

Original issue reported on code.google.com by pit00...@googlemail.com on 28 Sep 2012 at 3:29

GoogleCodeExporter commented 8 years ago
Although apparently similar, you're comparing two different things.

disk_partitions() provides information about mount points basically, that's why 
it is able to provide actual fs paths.
disk_io_counters() on the other hand provides information about physical raw 
disks, against which the concept of "partition" and "path" just can't be 
applied.

Linux itself (and other OSes too) is only able to provide IO stats on a 
per-disk fashion (e.g. "sda1"), not per-partition (e.g. "/home").

What one might actually do is figure out what partitions (e.g. ["/", "/home"]) 
are mounted under a certain disk (e.g. "sda1").
Should psutil provide a new function which does that?
Not sure. I'll have to think about that.

Original comment by g.rodola on 6 Oct 2012 at 10:32

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 12 Dec 2012 at 3:35

GoogleCodeExporter commented 8 years ago
Closing this out as won't fix.

Original comment by g.rodola on 21 Apr 2014 at 4:07