Using MSStorageDriver_FailurePredictData?

J

Jesse

Anyone with experience getting disk data from WMI, I sure could use some
advice!

I'm trying to figure out how to access MSStorageDriver_FailurePredictData
correctly, but I'm kind of stumped.

"select * from MSStorageDriver_FailurePredictData" gives me data for my
internal drive, but not my external USB drive

So I tested to see if I could filter by InstanceName:

"select * from MSStorageDriver_FailurePredictData where InstanceName =
'findNothing'" successfully returns no records

Next, I queried Win32_DiskDrive to get the instance names of my two drives:

deviceID = myManagementObject.Properties("PNPDeviceId").Value

....and after verifying that they looked correct (one of them matched the
InstanceName returned by MSStorageDriver), I tried to force MSStorageDriver
to find the other drive:

"select * from MSStorageDriver_FailurePredictData where InstanceName = '" &
deviceId & "'"

....but this crashes when I try to ennumerate the ManagementObjectCollection
returned by ManagementObjectSearcher. Since it's crashing, I know it's
returning *something* -- it worked fine when I filtered on "findNothing" --
but what?

Thanks for the help,

Jesse

--
 
P

Peter Falz

Hi Jesse,

Jesse said:
"select * from MSStorageDriver_FailurePredictData where InstanceName = '" &
deviceId & "'"
...but this crashes when I try to ennumerate the ManagementObjectCollection
returned by ManagementObjectSearcher. Since it's crashing, I know it's
returning *something* -- it worked fine when I filtered on "findNothing" --
but what?

the crash happens due to no existing instance, which can be deliverd
as result for your query. The ManagementObjectCollection is empty.

Why you can't get an instance for external USB drive?
Sorry, but i've no idea.

Bye
Peter
 
J

Jesse

Thanks, Peter. But it doesn't crash when I filter on "where InstanceName =
'findNothing'". So when it returns *no* records, there's no crash. But when
I filter on an actual instance name, it crashes, which suggests that there's
something specifically wrong with the way it's handling (or I'm handling)
the record returned by that query. (I think.)
 
W

Willy Denoyette [MVP]

Don't try to trick the system, there is no such class
(MSStorageDriver_FailurePredictData) for this device instance. If you say
it's crashing you mean it throws an exception, right? Which one?

USB storage drives are not supported out of the box (and I don't know any
vendor supplying SMART WMI enabled USBSTOR drivers), only IDE and SCSI
attached drives can supply SMART data through WMI.

Willy.
 
J

Jesse

Willy: Thanks. That's bad news for me, but good to know. Is there another
way to get SMART data (not using WMI) so that I can get it from a USB or
Firewire external drive?

The exception I'm getting is:

System.Management.ManagementException: Invalid query
at
System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus
errorCode)
at System.Management.ManagementObjectEnumerator.MoveNext()

Peter: I can't use CIM_Studio -- it seems to only run on VisualStudio; I'm
using VisualBasic.NET 2003 Std. (Too poor to buy VisualStudio.)
 
J

Jan Peter Stotz

Jesse said:
Willy: Thanks. That's bad news for me, but good to know. Is there another
way to get SMART data (not using WMI) so that I can get it from a USB or
Firewire external drive?

AFAIk there is *no* way to read SMART data from an USB or Firewire drive.
Even the smartmontools can not read any information from these drives
because the used bridging chips (USB2IDE or IEE1394_2IDE) do not pass the
SMART data to the OS.

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top