Closed GoogleCodeExporter closed 9 years ago
I don't think it's possible to differentiate between partitions, as the
screenshot you attached in issue 234 suggests:
http://dl.dropbox.com/u/1320617/Linux_Photos/win_psutil_winobj.jpeg
This is basically what DeviceIoControl() [1] lets us do.
[1]
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363216(v=vs.85).aspx
Original comment by g.rodola
on 6 Dec 2011 at 7:28
On the link of msdn that you posted writes:
------------------------------------------
Remarks
To retrieve a handle to the device, you must call the CreateFile function with
either the name of a device or the name of the driver associated with a device.
To specify a device name, use the following format:
\\.\DeviceName
DeviceIoControl can accept a handle to a specific device. For example, to open
a handle to the logical drive A: with CreateFile, specify \\.\a:.
Alternatively, you can use the names \\.\PhysicalDrive0, \\.\PhysicalDrive1,
and so on, to open handles to the physical drives on a system.
-----------------------------------------
Is it possible to use the characters of the logical volumes (A,C,D, etc)
instead of names (PhysicalDrive0,PhysicalDrive1, etc)?
I can't understand very well how it works so forgive me if i wrote something
wrong.
Original comment by kotsifi
on 6 Dec 2011 at 8:40
No, because "A", "C", "D" etc. are partitions, and on Windows there's
apparently no way to extract IO statistics for a certain partition only.
What we can do is providing IO stats of a certain *disk*, and they are
represented as 'PhysicalDrive0', 'PhysicalDrive1', etc.
I'm closing this out as WontFix.
Original comment by g.rodola
on 6 Mar 2012 at 12:43
Original issue reported on code.google.com by
kotsifi
on 6 Dec 2011 at 12:05