in reply to Re^2: SMART info from drives in win32 using WMI
in thread SMART info from drives in win32 using WMI

Well, again let me point out that I know next to nothing about WMI, so I could be very well just blowing air out my rear-end here. However, looking at that "link" you gave I see the following:
For IDE, this polling consists of sending the READ_SMART_STATUS comman +d. If this status indicates an error, a WMI event will be launched th +at includes the SMART attribute data.

It doesn't actually specify what is returned in the absence of an error. Your reply infers that print $Drive->{'Status'}; produces 'OK' ...could it be that this is the entirety of the status?

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^4: SMART info from drives in win32 using WMI
by Nemurenai (Acolyte) on May 17, 2006 at 14:50 UTC
    Oops, I mistyped
    MSStorageDriver_FailurePredictData
    (wrote 'MMStorage...'). Anyway, the
    $Drive->{'Status'}
    post was an example of pulling data from one of the data structures. Note, however, that the query is on
    Win32_DiskData
    which doesn't contain SMART info. I've looked at a header file (wmidata.h) in the MS DDK and gleaned a couple of the properties that the data stucture should have (SelfTestStatus, TotalTime + others). However, I can't even get that to work. Perhaps this is too win32 specific, but I can't figure out where else to ask about it. Besides, I'd hoped somebody had a clever answer about figuring out which attributes could be found. Thanks for the help though. Dumper will probably come in handy later :-p

      The quoted documentation says (or at least implies) that it only sends SMART info if a "failure" is detected (and waiting for SMART to decide something has failed is what makes it mostly useless, as I recently noted).

      - tye        

        Sorry for the long post, but you're a little mistaken;
        actually, the SMART information on a disk contains certain threshold levels which predict whether a drive will fail. Of course this can't be determined with 100% certainty, but think of it more like "This drive will probably fail soon, so you should replace it."

        The thresholds are programmed into the drive's firmware, so it's easy to see if a threshold has been reached. Every hard drive gets errors during its lifespan, but a lot of them can be corrected by the drive itself using checksums, spare sectors etc. As a drive gets older or begins to fail the error rate will increase, and this is detectable by querying the SMART info. According to a website I read about it about 60% of all hard drive failures can be predicted this way - That's a lot better than not getting a warning at all.