Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work for a company that has many machines around the world in the possession of customers that we need to get continuous diagnostics from. One of the issues is occasionally the hard drives of machines drop to PIO mode, but of course all the customer sees is a massive system slowdown.

I'm looking for a way to detect if a SATA hard drive has dropped to PIO mode through our diagnostic tools. This can be either a tool or command that we can run and store the output for later bundling into a dump that we get emailed by the customer, or programmatically through a Windows API.

It needs to be as automatic as possible. I've tried using 'devcon.exe' (command line device manager), but I haven't found how to be able to output that information even if I'm getting information about the hard drive controllers.

Any ideas?

share|improve this question

(This is using PowerShell on Windows 7, but you should be able to do the same things on Windows XP after installing PowerShell.)

Getting the WMI object associated with a specific IDE device (both PATA and SATA are treated as IDE at this level):

$ide = new-object "" 'Win32_IDEController.DeviceID="PCIIDE\\IDECHANNEL\\4&5ECF4F&0&0"'

(In this case I used devmegmt.msc to get the "Device Instance Path" for a SATA channel with a connected disk, but this can be queried for.)

But this Win32_IDEController object has nothing about the PIO/DMA setting. Hunting around the WMI associations shows up nothing either (to a couple of levels).

There doesn't seem to be anything in WMI that reflects device manager's "Advanced Settings" tab's content in WMI.

However, using the last element from the path abve (4&5ECF4F&0&0) I can in the registry under:

HKLM:\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel\4&5ecf4f&0&0\Device Parameters\Target0

values (most notably DeviceType) that differ for a PIO mode PATA DVD-RW drive here. But I cannot quickly find a definition for these values.

share|improve this answer

Maybe this will help you creating VBScript to solve your problem and where there is an explenation on how DMA reverts to PIO with possible solutions.

And also you can check a little on Window wmic commands , for example " wmic dmachannel get / value " to retrieve your information and to put it into a "shell" command for your code and for a possible automation for your Windows API.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .