Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

S.M.A.R.T Drive Status???

Am I missing something or does PDQ inventory no collect the S.M.A.R.T status of drives on computers?

2

Comments

17 comments
Date Votes
  • This is what I've come up with as a workaround...
    The script below is deployed out to all of my computers using a simple Command step in a package. What this does is create a text file located at C:\SmartStatus\ with the filename status.txt. This file contains the actual status of the dirve. PDQ inventory has no way of reading the files contents when performing an inventory scan so what the script does is rename the file to OK.txt if the status is OK, and ERROR.txt if there is a problem.

    I can then setup a file scan in PDQ inventory to check for these files and setup collections or reports for any computers that may still be working but S.M.A.R.T has detected a problem on the drive.

     

    @echo off md c:\SmartStatus del c:\SmartStatus\status.txt /Q wmic /OUTPUT:c:\SmartStatus\status.txt diskdrive get status find "OK" C:\SmartStatus\status.txt >nul if %errorlevel%==0 GoTo doingGood ren C:\SmartStatus\status.txt ERROR.txt GoTo done :doingGood ren C:\SmartStatus\status.txt OK.txt :done

    0
  • @echo off

    md c:\SmartStatus

    del c:\SmartStatus\status.txt /Q

    wmic /OUTPUT:c:\SmartStatus\status.txt diskdrive get status

    find "OK" C:\SmartStatus\status.txt >nul

    if %errorlevel%==0 GoTo doingGood

    ren C:\SmartStatus\status.txt ERROR.txt

    GoTo done

    :doingGood

    ren C:\SmartStatus\status.txt OK.txt

    :done

    0
  • So far this has identified 6 computers with failing hard drives at one of my locations. The users had not reported any issues yet and I was able to get to them before they completely failed.

    0
  • Well done!

    I love seeing problem solving at work. We will look into adding this data natively in a future version.

    Props to you. Your organization is obviously well served.

    0
  • Hi Shane,

    Any news for this new feature? That would be very useful for us.

    Thanks,

    Vincent

    0
  • We do have this feature tentatively scheduled for a future release. We have a lot of other features that we are planning on adding so it's a little farther back in the queue. I wouldn't expect to see it until late this year or early next.

    0
  • How did you write the file scanner to pick up the file? I cant figure out how to do it and have tried a lot of options! Please help.

    0
  • The file scan just scans for C:\SmartStatus\OK.txt if the drive has no smart errors and C:\SmartStatus\ERROR.txt if there is a problem.

    Scan for both of those files and then you can base your reports or dynamic computer groups on if they have the ERROR or OK text file.

    0
  • Also remember that the file scan is just one part of this, you also need to create a package that runs on a schedule and is what checks the status and creates the files.

    0
  • So what am I missing? I know the file exists on this machine.

    0
  • that looks good, should show all computers with OK.txt (meaning no issues).

     

    Double click on one of your computers in PDQ inventory and look at its list of files to see if it has OK.txt or Error.txt if it does not then either the package has not run on the machine yet or the custom file scan is not picking up the file.

    0
  • here are my file scans, last one is for S.M.A.R.T. status.

     

    0
  • ha i just noticed that the last line was redundant and removed it. *.txt should get every text file in the folder.

    0
  • I am just +1 support for this feature natively.  I will play around with the script in the meantime.  

    0
  • Hey Mmuni, I know this is old but I like what you've done with the script, just one thing however. At the beginning it deletes status.txt but that file wont exist anymore anyway if its already run through once it will either be called OK or Error. So next time you run it it fails because it cannot change the name of status.txt to an existing file name.

    Forgive me if Ive misunderstood anything, I modified the code as follows:

    @echo off

    md c:\SmartStatus

    del c:\SmartStatus\OK.txt /Q

    del c:\SmartStatus\ERROR.txt /Q

    wmic /OUTPUT:c:\SmartStatus\status.txt diskdrive get status

    find "OK" C:\SmartStatus\status.txt >nul

    if %errorlevel%==0 GoTo doingGood

    ren C:\SmartStatus\status.txt ERROR.txt

    GoTo done

    :doingGood

    ren C:\SmartStatus\status.txt OK.txt

    :done

     

    Thanks.

     

    0
  • Here I am, 5 years later with how I set it up

    New Dynamic Collection: SMART Status OK

    Filter: Disk Drive

    Column: SMART Status

    Comparison: Equals

    Value: OK

     

    New Dynamic Collection: SMART Status Not OK

    Filter: Disk Drive

    Column: SMART Status

    Comparison: Does Not Equal

    Value: OK

     

    Although, that script above IS pretty bada$$

    1
  • Sara S, yes that is a better way to do it now that PDQ officially added support.

    They have come a long way.

    0