WMI support? Yes please!

Any new ideas, possible impromevents for future versions.
unknown14725
Posts: 7
Joined: 2015.08.30. 19:26

WMI support? Yes please!

Post by unknown14725 »

I'd love to see WMI implementation in a future version. I do realize this might be a large feature to implement, though. But this software would then be the sole provider of SMART info over WMI, as there is no other software that does it properly.

Afaik, there is only one program that does something similar: OpenHardwareMonitor. But the project is more or less dead. Some SMART info is made available through WMI, but it's extremely limited, and a lot of controllers and drive models aren't even detected at all.

But HD Sentinel detects everything, no matter the drive model or controller. And having SMART accessible in WMI would be ultra nice for system administrators that have many systems to keep an eye on.

And yeah, I expect some people to claim WMI already has native SMART support. But, it doesn't really. I have three computers with various motherboards at my workstation here, and i.e. win32_diskdrive class doesn't report errors on any drive that has hard errors of various degree or have failed totally. I suspect it might be BIOS or controller incompatibility, so WMI does not retrieve information from them. Unfortunately many things in native WMI doesn't really work and never have (i.e. temperature and fan readings). (Reference: http://wutils.com/wmi/root/cimv2/win32_diskdrive/ )

But yes, WMI support. Pretty please. Make a HD Sentinel SuperPro version, and charge a couple of bucks extra for WMI. I'll buy it.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

Hi,

Thanks for your message and your words :)

You're knocking on open doors: the latest beta version already has WMI support ;)
If you see www.hdsentinel.com , version 4.71.5c showed with "WMI support".

In this version, according the beta revision update ( http://www.hdsentinel.com/beta4/hdsenti ... vision.txt )

- added option to provide disk status information via WMI
(Configuration -> Advanced options -> Provide status information by WMI)
Note: registered version only, contact info@hdsentinel.com for example use

This is available in the registered version of Hard Disk Sentinel Pro only. Currently in beta (testing) stage.

For a quick test, you may save the following to a vbs script:

Code: Select all

strComputer = "hds"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from HDSentinel",,48)
For Each objItem in colItems
    Wscript.Echo "ID: " & objItem.ID
    Wscript.Echo "ModelID         : " & objItem.ModelID
    Wscript.Echo "SerialNumber    : " & objItem.SerialNumber
    Wscript.Echo "FirmwareRevision: " & objItem.FirmwareRevision
    Wscript.Echo "Interface       : " & objItem.Interface
    Wscript.Echo "PowerOnTime     : " & objItem.PowerOnTime
    Wscript.Echo "Report          : " & objItem.Report
    Wscript.Echo "TemperatureC    : " & objItem.TemperatureC
    Wscript.Echo "Health %        : " & objItem.Health
    Wscript.Echo "Performance %   : " & objItem.Performance
    Wscript.Echo "LifetimeWriteMB : " & objItem.LifetimeWriteMB
    WScript.Echo ""
Next
(just make sure to specify the computer name in the first line at strComputer = "hds".
For local PC, this can be localhost or so).

Hope this helps ;)
unknown14725
Posts: 7
Joined: 2015.08.30. 19:26

Re: WMI support? Yes please!

Post by unknown14725 »

...!

Wow, yeah that was almost spooky haha

When I saw your reply, I immediately quit my movie watching and grabbed my laptop to test it. I've had a quick look with WMI Explorer to see what info is available, but there wasn't much at the moment tbh :D I was a little frustrated by some data being reported as human-readable strings (i.e. PowerOnTime). But I'm guessing there's more to come. Soon I hope!

Do you have any planned structure for how you're going to provide stats and information? Is the beta a realistic sneak-preview of how it will be presented? One WMI instance per device, with SMART data as properties? (Is there a specific reason for using root/WMI? Isn't that meant for drivers? Wouldn't root/cimv2 be more suitable, as it's the default scripting namespace... Or have I misunderstood?)

(I have to admit I've sort of become very fond of OpenHardwareMonitor's system where each data point is its own WMI instance, as it makes it easy to parse data in external tools. For comparison... http://i.imgur.com/2X8oiGX.png )

I am developing custom sensors for PRTG, and I will definitively be looking into ways of integrating HD Sentinel with PRTG when all your WMI pieces are falling into place :)
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

> I was a little frustrated by some data being reported as human-readable strings (i.e. PowerOnTime).

According my experiences, users always prefer quick, "human-readable" information to be reported, for example by making quick VBS scripts to get and display the information they are interested.

> But I'm guessing there's more to come. Soon I hope!

Yes of course ;)
That's why it is in beta stage and just introduced with the most important basic information.
Now I'm collecting ideas, thoughts, recommendations about how to modify / change / improve.


> Do you have any planned structure for how you're going to provide stats and information?
> Is the beta a realistic sneak-preview of how it will be presented?

Sorry, I do not really understand what you mean...

> One WMI instance per device, with SMART data as properties?

Sorry, I do not really understand what you mean...
I did not prefer to provide complete S.M.A.R.T. data - if that's and the details important, users may choose the XML-style automatic export
(see Configuration -> Advanced options -> Generate and update XML file).
That feature is available for long time, designed exactly for developers of third party applications / scripts. Many add-ons use that to provide complete information in diferent ways, for example the remote PC gadget, Nagios integration ( http://www.hdsentinel.com/add-ons.php )


> Is there a specific reason for using root/WMI? Isn't that meant for drivers?
> Wouldn't root/cimv2 be more suitable, as it's the default scripting namespace... Or have I misunderstood?

I did not know it is reserverd for drivers ;)
As I know, other software may use that too.
But I'll check if root/cimv2 would be better.


> (I have to admit I've sort of become very fond of OpenHardwareMonitor's system where each data point
> is its own WMI instance, as it makes it easy to parse data in external tools.

Thanks! I've never used it, so not really sure how it may be different.
To be honest, (as the simple VBS script suggests) I feel it is really easy to parse data from the Hard Disk Sentinel WMI instance.


> I am developing custom sensors for PRTG, and I will definitively be looking into ways of
> integrating HD Sentinel with PRTG when all your WMI pieces are falling into place :)

Thanks, I'd be more than happy to assist and make the integration as easy as possible, especially if you may consider helping other users, for example by sharing information / details about a such possible integration. Then that article can be also added on the Add-ons page, exactly to help users to get the maximum possible from both tools.

Please contact me in e-mail at info@hdsentinel.com about your ideas, thoughts, recommendations and requirements and I'll check the possibilities about how things can be even better ;)
unknown14725
Posts: 7
Joined: 2015.08.30. 19:26

Re: WMI support? Yes please!

Post by unknown14725 »

Hi again!


First of all, I'm sorry about this long wall of text, but your announcement of WMI in HD Sentinel has me very excited! Hahah. This is something I've been wanting to see for a decade to be honest!

Secondly, my opinions below are just that; my opinions. They aren't meant as criticism of your concepts. I just wanted to express my ideas, and discuss them :)
users always prefer quick, "human-readable" information to be reported, for example by making quick VBS scripts to get and display the information they are interested.
Well, this would sort of undermine the whole purpose of WMI, now wouldn't it? :) WMI (and SNMP) is meant as a way for applications (not users) to access information on a remote/local system for further processing.
To be honest, (as the simple VBS script suggests) I feel it is really easy to parse data from the Hard Disk Sentinel WMI instance.
You're not supposed to have to parse and decode data every time you access information in WMI. That data values should be used as-is (raw or cooked numerical values, or ).

For example WMI OS system uptime is presented as seconds or 100ns. (In Linux/SNMP it's shown as 1/100s timeticks since initialization). It's never presented as "2 days, 23 hours, 1 minute, 45 seconds, 45 milliseconds" :) The raw WMI SystemUpTime (Win32_PerfRawData_PerfOS_System) property value would be "131138847276107984" (in 100ns) , while the cooked SystemUpTime (Win32_PerfFormattedData_PerfOS_System) property value would show "123885" seconds - while counting.


If you provide PowerOnTime as human-readable, it will complicate WMIC WQL searching - and parsing - quite a lot when gathering information from systems. Lets say you wanted to collect the number of workstations (or servers) that have drives that are over a certain age. If PowerOnTime is presented as hours (i.e. integer), it's easy to just do a query looking for values above said number of hours. Super fast search to get your results. But when PowerOnTime is a string, you have to take into consideration that the days number is only the first section of the string, and might be of different length, and on some systems there might no be days at all (if it's a new drive). So you have to check the other parts of the strings as well, to see if the string "days" is present. If not you have to double check and see if "hours" is present. Urgh this is a developer's nightmare haha. All this can of course be done in WMIC command line, but makes WQL queries unnecessary complex and long, and it takes longer time to process.

And most importantly... if you provide information only as human-readable, you will also exclude a lot of applications from reading your WMI information, because 100% of all monitoring software out there expect numerical values (i.e. int or float). They cannot readily interpret custom text strings meant to be read by humans. Not without external scripts that "decode" the text strings back to int or float values. So again, it complicates information retrieval, and it will most certainly exclude HD Sentinel from being used in monitoring software. And administrators/developers that do not know how (or don't want to spend time) to program custom scripts to solve this problem will probably never consider using HD Sentinel for this important task.

So yeah, I honestly do not believe you should present information as human-readable strings. At least not as the primary way to present it. But perhaps have two properties; one with raw hours, and another with human-readable?

As for the Report property... You should also consider breaking down the report status into several numerical properties as well (and not just a human-readable text string). I don't know how HD Sentinel generates its report string (I don't know the defined expressions and words you use), but maybe something like this...

For example:

Code: Select all

0 = UNKNOWN
1 = PERFECT 
2 = BAD SECTORS   (and have another separate property with the sector count)
3 = CRASHED 
4 = UNAVAILABLE
5 = EXPLODED AND CURRENTLY IN FLAMES! [i]help[/i]
Another example for SSD TRIM:

Code: Select all

0 = UNKNOWN   (i.e. not an SSD)
1 = SUPPORTED AND ENABLED
2 = SUPPORTED BUT DISABLED
3 = NOT SUPPORTED
...etc.

This is a very common way to present status information numerically.


For example (just as comparison) from the Synology SNMP MIB

Code: Select all

1 = Normal: The raid functions normally.
2 = Repairing
3 = Migrating
4 = Expanding
5 = Deleting
6 = Creating
7 = RaidSyncing
8 = RaidParityChecking
9 = RaidAssembling
10 = Canceling
11 = Degrade: Degrade happens when a tolerable failure of disk(s) occurs.
12 = Crashed: Raid has crashed and just uses for read-only operation.
(Yes, I know this is RAID status and not SMART, but just as a demonstration to show the concept. This is a common method in SNMP and WMI way to present status information without using human readable strings.)


I did not prefer to provide complete S.M.A.R.T. data
Yeah, I didn't expect you to dump the entire SMART into WMI. But maybe access to some of the most critical attributes so monitoring software can keep an eye on what's going on. For example start/stop counts, power cycle count, and general error attributes such as reallocated block counters etc. I do realize you have the Health property, but it would be practical to also know WHY it's showing 90% without having physical access to the computer to look in HD Sentinel UI (or read the xml file or data files).

if that's and the details important, users may choose the XML-style automatic export
Well... WMI (and SNMP) offers a super light-weight way to have quick access to information without needing access to the OS itself or the local filesystem. It's not dependent on directory paths or other variables that might change from system to system. For example, how would monitoring software access this xml file reliably? You would need to have file and printer sharing enabled, and also have it opened in the firewall (not a good thing in all network environments). And have user credential permissions set up, etc, etc. And it would have to read the entire file on each poll. This makes deployment very difficult, and takes a lot more system resources (cpu resources and network traffic) than a simple WMI query. Imagine this being done on 30 or 100 computers in an office or in a large gaming center (yes, that's what I work with). Reading this xml file once a minute externally would have a major impact on system resources, both locally and remotely.

And what happens if the drive that has the xml file fails? You might not be able to gather information about why that drive failed anymore because it's being used as data storage! :o So now you need other means of access to the computer so you can investigate.
root/cimv2 ... As I know, other software may use that too.
Haha yeah, a lot of software developers dump their stuff into random places sometimes. Just look at the registry haha! For example OpenHardwareMonitor creates it's own Namespace "Root/OpenHardwareMonitor". It's not critical though, and doesn't really matter. I just wanted to give a heads-up because you are so early in the development :) And because root/cimv2 is the default namespace, you don't have specify the namespace on each WMI query either.


Then that article can be also added on the Add-ons page
I would really love to create a guide specifically for HD Sentinel when the WMI portion is up and running :)

I have already written an instructional guide for PRTG ( https://sites.google.com/site/prtghowto/ ), but I am in process of rewriting all the scripts from scratch to make them more stream-lined, faster and with more features, while also making sure they work on any system and not just my own.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

Thanks so much for your really kind and constructive message !

> Secondly, my opinions below are just that; my opinions. They aren't meant as criticism of your concepts.

Sorry but from your words, I feel that.

> I just wanted to express my ideas, and discuss them :)

Me too ;)

Some months ago two different users from the world contacted me to add WMI support where they can get "human-readable" information quickly and easily to display in text reports / use with VBS scripts.

Then I added these and thought it is the beginning.

As developer, I always feel things can (and should be) improved and I was thinking about adding more and more functions, exactly to make things more useful and better. And especially as I tried to explain, the integration part was (and will be) one of the most important features.

This is why the first version released (and the above mentioned users were happy about it) and I wanted to collect other ideas, thoughts, suggestions (for example from users of monitoring solutions where Hard Disk Sentinel can be a great addition) about what could be done to make it even more useful. For example yes, by adding values which could (and should) be interpreted by these monitoring tools / solutions.

Just I did not want to make it which may be not the best for that solution - this is why I only added information asked by the above mentioned users and consider adding more information in "non-human readable" but "programmer-readable" format too.

So thanks for teaching me about how to make programs and functions and thanks for laughing - but you did not really make me happy.


> At least not as the primary way to present it. But perhaps have two properties; one with raw hours, and another with human-readable?

Yes, this is the idea and this will happen in the next version.


> As for the Report property... You should also consider breaking down the report status into several numerical properties
> as well (and not just a human-readable text string). I don't know how HD Sentinel generates its report string (I don't
> know the defined expressions and words you use), but maybe something like this...

The report property is designed exactly to show the current report in human readable format.
This is designed to represent the error counters, generally show WHY the health is 100% (no problems found), 90% or anything else.
This property can be ignored if the user is not interested in this explanation ;)

> For example:
> 0 = UNKNOWN
> 1 = PERFECT
> 2 = BAD SECTORS (and have another separate property with the sector count)
> 3 = CRASHED
> 4 = UNAVAILABLE
> 5 = EXPLODED AND CURRENTLY IN FLAMES! help[/code]

To be honest, I do not really feel this is useful... Many people worry about "bad sectors" even if they cause no problems, since they're already reallocated. There are numerous other problems which can degrade a hard disk, can cause data corruption/data loss and failure.


> Another example for SSD TRIM:
>

Code: Select all

0 = UNKNOWN   (i.e. not an SSD)
> 1 = SUPPORTED AND ENABLED
> 2 = SUPPORTED BUT DISABLED
> 3 = NOT SUPPORTED
Yes, this may useful.

> This is a very common way to present status information numerically.

Thanks for the lesson ;)

> Yeah, I didn't expect you to dump the entire SMART into WMI.
> But maybe access to some of the most critical attributes so monitoring software can keep an eye on what's going on.

I suspect limited SMART would be not a good choice.
We should have complete SMART data or nothing.
Currently it is not available because I did not yet find the best way to represent all information in the best way which can be most useful for possible other uses, can be easily loaded, parsed by scripts and/or other monitoring tools.

So here I'm really open for suggestions about how to represent, what would be the best way which allows the easiest integration.


> For example start/stop counts, power cycle count, and general error attributes such as reallocated block counters etc.

There are dozens of other attributes which are very important - and could be interesting in many cases.
Not only critical values, but statistical ones (maybe no need to mention the attributes you prefer to use in Write Amplification calculation ;)

This is one part where I was sure that improvement required - to provide all S.M.A.R.T. data to allow users to get precise, clear representation of attributes, counters etc.
Not only the "vendor specific" raw data which would need to be interpreted.


> I do realize you have the Health property, but it would be practical to also know WHY it's showing 90%
> without having physical access to the computer to look in HD Sentinel UI (or read the xml file or data files).

This is exactly the purpose of the Report property ;)
No need to check the UI and/or the XML report - as you'll immediately know the reason and the error counters.


> the local filesystem. It's not dependent on directory paths or other variables

You can get the XML report remotely if you enable the Configuration -> Integration -> Enable Webstatus and open
http://hostname:61230/xml
This method used widely by the add-ons to check the COMPLETE status remotely.

But yes, I completely agree that WMI is simpler and does not require enabling port on firewall and so.

This is why I planned to extend - and collecting ideas, suggestions about how.


> OpenHardwareMonitor creates it's own Namespace "Root/OpenHardwareMonitor".

Yes, and there are others using root namespace.
I see no reason in moving to cimv2, but if you feel it is better and can suggest why, I'm open for that.

> And because root/cimv2 is the default namespace, you don't have specify the namespace on each WMI query either.

Personally I was always thinking to use root namespace as cimv2 may be better to leave for Windows (OS-defined) objects.
But maybe I'm wrong - as "I'm on the beginning of development" in the WMI provider functionality.


> I would really love to create a guide specifically for HD Sentinel when the WMI portion is up and running :)

Thanks, that would be excellent - and this is generally I waited before adding MORE functions: to discuss how it is best to make things from the beginning, instead of changing, fixing some already-done functions.
So if you can help about what information would be nice to have and in which format / representation, I'd be really happy to hear and make things exactly to help integration.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

> I have already written an instructional guide for PRTG ( https://sites.google.com/site/prtghowto/ ),
> but I am in process of rewriting all the scripts from scratch to make them more stream-lined, faster and with more features,
> while also making sure they work on any system and not just my own.

While personally I did not use PRTG, I can share a code snippet I recently got (see credits on the end, thanks for that!).
I planned to add to the Add-ons page, just had no time yet, but it may be interesting.
This is based on the XML report function too, not WMI.


PRTG offers direct XML reading functionality which you might be interested in. The catch for full function is that it requires special formatting.
Here's some example PowerShell code that shows the XML need.

====================

Reads from URL, writes to SYS$OUTPUT
Requires Powershell 3 or 4 (?)

---------

$result = Invoke-WebRequest -Uri "http://hostname:61220/xml" -ErrorAction SilentlyContinue -UseBasicParsing

if ($result.StatusCode -ne 200){
write-host "<prtg>"
write-host "<error>1</error>"
write-host "<text>HTTP Request Failed</text>"
write-host "</prtg>"
Exit
}

[xml] $xdoc = $result.Content

## Write-Output $result.Content
## Write-Output $xdoc

Write-Output "<prtg>"

foreach ($xmlnode in $xdoc.Hard_Disk_Sentinel.Childnodes.Hard_Disk_Summary) {
Write-Output "<result>"
Write-Output "<channel>$($xmlnode.Hard_Disk_Serial_Number)</channel>"
Write-Output "<value>$($xmlnode.Health)</value>"
Write-Output "<float>1</float>"
Write-Output "</result>"
}

Write-Host "</prtg>"

====================

Just for your interest.


-- Ken Wallewein


www.kmsi.net -- web
kenw@kmsi.net -- personal
support@kmsi.net -- IT Support


(Thanks for Ken for sharing this code).
User avatar
Coool
Posts: 2
Joined: 2015.02.17. 15:32
Location: 🇪🇺

Re: WMI support? Yes please!

Post by Coool »

Hi, hdsentinel.

Image I have almost decade experience with Cacti (http://cacti.net). :ugeek: Are you considering implementing SNMP support (v3 with security options would be the best)? I now trying to get working XML part with Cacti using http://hostname:port/xml on Windows machines. I would like to see some security options (SSL, TLS) under WebStatus. Are Accept remote connections from server using any sort of encryption? How often is updated XML file? On Linux machines you can use https://smartmontools.org and Google suggested guides how to monitor S.M.A.R.T. data with Cacti https://google.lv/search?q=smart+snmp+cacti. S.M.A.R.T. data do not tell truth about HDD real health. Sometimes re-scanning surface from defects and clearing S.M.A.R.T. data on HDD it's like new one :mrgreen: I don't like WMI stuff. More common is SNMP in monitoring applications. So I suggest better implement SNMP.

P.S.

Currently the best HDD monitoring software on Windows - Hard Disk Sentinel. (More than 15 years had testing different applications and this one must have :D )

Thanks.
𝕮𝖔𝖔𝖔𝖑 🌈 🏳️‍🌈 🇪🇺
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

> Are you considering implementing SNMP support

Yes, I already started development of such function years ago.
Things work without problems, the status can be accessed via SNMP - just that due to technical limitations only 32 bit SNMP agent is possible.
This works perfectly on 64 bit systems too: the SNMP agent initialised, loaded and running - but somehow 64 bit systems do not forward the SNMP queries to the running agent.
This is where I'm stuck - and this is why such function not yet released for public, because I'm still looking for solution about what to do / enable in 64 bit Windows to properly manage the 32 bit complied SNMP agent.
If that would be possible, SNMP functionality will be released.

> (v3 with security options would be the best)?

I did not pay attention about security options in SNMP yet. Not only because of the above, but also because I feel it is not required, there are no sensitive data sent.


> I now trying to get working XML part with Cacti using http://hostname:port/xml on Windows machines.

Yes, generally the XML export function is one of the possible options how Hard Disk Sentinel can export/publish the detected information and to be connected with other third party tools/scripts.
This is used in different add-ons (eg. the Nagios integration) and users can use with PRTG too.
Personally I never used Cacti, but I'm sure it can be also integrated with that.


> I would like to see some security options (SSL, TLS) under WebStatus.

Thanks for the tip, I'll check the possibilities.

However, I suspect it may be not too useful or practical.
This would require crypto key on the client side and makes things complicated for no real reason.
As the WebStatus provides only status/report information (and can be secured now with password) this should be enough protection.
But if not, it is possible to export the XML data locally and make an add-on which sends the status over the network encrypted.


> Are Accept remote connections from server using any sort of encryption?

That option and function is designed for the connection with Hard Disk Sentinel Enterprise Server.
For other purpose (without the Hard Disk Sentinel Enterprise Server) that option / function is not usable.


> How often is updated XML file?

Based on the detection frequency, which happens once per every 5 minutes by default.
It canbe adjusted at Configuration -> Advanced options page.


> On Linux machines you can use https://smartmontools.org and Google suggested
> guides how to monitor S.M.A.R.T. data with Cacti https://google.lv/search?q=smart+snmp+cacti.

Excellent.
I'm waiting for somebody to write similar guide for Hard Disk Sentinel too.


> S.M.A.R.T. data do not tell truth about HDD real health.

This is absolutely NOT true.
S.M.A.R.T. data (checked and interpreted correctly) tells the truth about the real health and status.
This is what I described years ago at www.hdsentinel.com/smart

Just we need to properly interpret and understand values - instead of simply checking if error-level-threshold is reached or not.
That method (used in other tools and BIOS S.M.A.R.T. checking) is really not able to tell the truth about problems.
This is why development of Hard Disk Sentinel started in general - to detect and reveal any kind of real problems.


> Sometimes re-scanning surface from defects and clearing S.M.A.R.T. data on HDD it's like new one

(Re)scanning the surface (complete surface scan) is very important, especially on installation of a new / used hard disk,
exactly to reveal any kind of problems.
This is why I recommend this for users for many years, to detect and show problems - otherwise issues related to
infrequently accessed areas may remain undetected for months or even years.
This is described at http://www.hdsentinel.com/faq.php#tests
and such situation described at http://www.hdsentinel.com/hard_disk_cas ... ectors.php


Of course it is not possible to clear S.M.A.R.T. data (and "make a hard disk new") which contains the errors occured during the lifetime of the hard disk.
With (only) Hard Disk Sentinel it is possible to acknowledge errors and virtually clear / correct the error counters, for example to prvent displaying
problems occured before a cable / connection replacement or fix, prevent displaying previous bad sectors (which are no longer used)
and focus only on possible new problems.
But this does not make hard disk "like new" - just lets the user acknowledge and clear previous issues and focus on possible new ones.
These are described (for example) at:
http://www.hdsentinel.com/hard_disk_cas ... _error.php
and
http://www.hdsentinel.com/faq_repair_ha ... _drive.php


> I don't like WMI stuff.

Sorry, but then I do not really understand why you posted in a topic asking for that ;)
WMI can be also very useful and (according the requests asking for that) it is widely used by admins who can make very simple solutions (eg. VBS scripts or similar) to check and display status information.


> More common is SNMP in monitoring applications. So I suggest better implement SNMP.

Yes. This is why I started SNMP researching in approx. 5 years ago - just found no solution for the 64 bit system + 32 bit agent problem yet.
If you (as user of SNMP agents) have suggestions or ideas, please let me know, this may help!


> Currently the best HDD monitoring software on Windows - Hard Disk Sentinel. (More than 15 years had testing
> different applications and this one must have :D )

Thanks so much for your kind words :)
User avatar
Coool
Posts: 2
Joined: 2015.02.17. 15:32
Location: 🇪🇺

Re: WMI support? Yes please!

Post by Coool »

hdsentinel wrote:
Coool wrote: S.M.A.R.T. data do not tell truth about HDD real health.
This is absolutely NOT true.
S.M.A.R.T. data (checked and interpreted correctly) tells the truth about the real health and status.
This is what I described years ago at www.hdsentinel.com/smart

Just we need to properly interpret and understand values - instead of simply checking if error-level-threshold is reached or not.
That method (used in other tools and BIOS S.M.A.R.T. checking) is really not able to tell the truth about problems.
This is why development of Hard Disk Sentinel started in general - to detect and reveal any kind of real problems.
OK, can tell how much relocated sectors, ECC and communication errors had.
hdsentinel wrote:
Coool wrote:Sometimes re-scanning surface from defects and clearing S.M.A.R.T. data on HDD it's like new one
(Re)scanning the surface (complete surface scan) is very important, especially on installation of a new / used hard disk,
exactly to reveal any kind of problems.
This is why I recommend this for users for many years, to detect and show problems - otherwise issues related to
infrequently accessed areas may remain undetected for months or even years.
This is described at http://www.hdsentinel.com/faq.php#tests
and such situation described at http://www.hdsentinel.com/hard_disk_cas ... ectors.php


Of course it is not possible to clear S.M.A.R.T. data (and "make a hard disk new") which contains the errors occured during the lifetime of the hard disk.
With (only) Hard Disk Sentinel it is possible to acknowledge errors and virtually clear / correct the error counters, for example to prvent displaying
problems occured before a cable / connection replacement or fix, prevent displaying previous bad sectors (which are no longer used)
and focus only on possible new problems.
But this does not make hard disk "like new" - just lets the user acknowledge and clear previous issues and focus on possible new ones.
These are described (for example) at:
http://www.hdsentinel.com/hard_disk_cas ... _error.php
and
http://www.hdsentinel.com/faq_repair_ha ... _drive.php
I always suggest every unexperienced users before using any kind of storge make full surface test. Have you heard something about terminal commands? On disk which I know is in good shape but somehow get some bad sectors, communication and ECC errors I will rescan (low level format) user area (so all bad blocks are in sequential order in P-list) and make N1 clear S.M.A.R.T. data. So they don't bother me :D
hdsentinel wrote:
Coool wrote: I don't like WMI stuff.
Sorry, but then I do not really understand why you posted in a topic asking for that ;)
WMI can be also very useful and (according the requests asking for that) it is widely used by admins who can make very simple solutions (eg. VBS scripts or similar) to check and display status information.
You suggest me to make new thread SNMP Support! You don't be so ugly like gays from Thermaltake about Digital power supply request about SNMP support. They just deleted thread. :D
hdsentinel wrote:
Coool wrote: More common is SNMP in monitoring applications. So I suggest better implement SNMP.
Yes. This is why I started SNMP researching in approx. 5 years ago - just found no solution for the 64 bit system + 32 bit agent problem yet.
If you (as user of SNMP agents) have suggestions or ideas, please let me know, this may help!
Try to dig deeper.
𝕮𝖔𝖔𝖔𝖑 🌈 🏳️‍🌈 🇪🇺
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

> OK, can tell how much relocated sectors, ECC and communication errors had.

And many others: weak sectors, spin up problems and so.
Plus the statistical information like power on time, power cycle count, load/unload cycle count - and wearout / lifetime writes for SSDs and many-many more.
These are all important factors in determining the current status and prepare for failure (or just planned replacement near the end of lifetime).


> I always suggest every unexperienced users before using any kind of storge make full surface test.

I always suggest intensive testing and complete surface test (ideally tests - with both read and write tests) for ALL users.


> Have you heard something about terminal commands? On disk which I know is in
> good shape but somehow get some bad sectors, communication and ECC errors I
> will rescan (low level format) user area (so all bad blocks are in sequential order
> in P-list) and make N1 clear S.M.A.R.T. data. So they don't bother me :D

Yes this is possble of course with special diagnostic tools (hardware devices).
If you invest in such tools or ask for a professional data recovery company to do this - it is (theoretically) possible. Just may not worth it.

I mean it is not possible to clear S.M.A.R.T. by simple commands / software economically and easily on normal IDE/SATA connections.


> You suggest me to make new thread SNMP Support!

Yes. Users always post new topics which clearly describe the complete meaning of the topic (and the feature in this case).
This is normal - as makes easier to find topics, discuss things in the relevant topic ;)


> You don't be so ugly like gays from Thermaltake about Digital power supply request about SNMP support. They just deleted thread. :D

Wow, this is strange.
I never delete topic / post - unless it contains spam/advert (or may be offensive - but I do not remember similar).
I'm always interested in new ideas, thoughts, feature requests in constructive ways, as these always help to improve the software and make it more and more usable ;)


> Try to dig deeper.

Thanks for the tip, I'm doing that constantly - researching about possibilities and add new functions/features based on the results.
Some may require more time until a solution found - but at least your message asking for a feature may increase priority for development on a specific area.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

WMI updates and new information available in Hard Disk Sentinel Pro 4.71.12 version, based on your suggestions and thoghts.

If you have some time, please check this update:

http://www.hdsentinel.com/beta4/hdsenti ... -mmbhd.zip

To use this version, please just completely close the current version by File -> Exit and
(without uninstallation) install this version to the same folder, where the previous installed.
This way the new version will automatically use all statistics, settings, registration/license details
just provide new functions.
If you prefer, you may backup the complete original folder - just to be safe.


Here is an updated complete VBS script which demonstrates the information provided by WMI:

Code: Select all

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
    Set colItems = objWMIService.ExecQuery("Select * from HDSentinel",,48)
    For Each objItem in colItems
        Wscript.Echo "ID: " & objItem.ID
        Wscript.Echo "ModelID         : " & objItem.ModelID
        Wscript.Echo "SerialNumber    : " & objItem.SerialNumber
        Wscript.Echo "FirmwareRevision: " & objItem.FirmwareRevision
        Wscript.Echo "Interface       : " & objItem.Interface
        Wscript.Echo "PowerOnTime     : " & objItem.PowerOnTime

        Wscript.Echo "PowerOnHours    : " & objItem.PowerOnHours
        Wscript.Echo "StartStopCount  : " & objItem.StartStopCount
        Wscript.Echo "BadSectorCount  : " & objItem.BadSectorCount
        Wscript.Echo "WeakSectorCount : " & objItem.WeakSectorCount
        Wscript.Echo "SpinRetryCount  : " & objItem.SpinRetryCount
        Wscript.Echo "CommIssueCount  : " & objItem.CommunicationIssueCount
        Wscript.Echo "StatusCode      : " & objItem.StatusCode
        Wscript.Echo "TRIMStatus      : " & objItem.TRIMStatus

        Wscript.Echo "Report          : " & objItem.Report
        Wscript.Echo "TemperatureC    : " & objItem.TemperatureC
        Wscript.Echo "Health %        : " & objItem.Health
        Wscript.Echo "Performance %   : " & objItem.Performance
        Wscript.Echo "LifetimeWriteMB : " & objItem.LifetimeWriteMB

        Wscript.Echo "SMART           : " & objItem.SMART
        WScript.Echo ""
    Next
(just copy/paste it to hdsentinel-wmi-demo.vbs and start cscript hdsentinel-wmi-demo.vbs to display the information).
Make sure to enable Configuration -> Advanced options -> Provide status information by WMI option first.

The following new information available:

PowerOnHours - power on hours value (without converting to days, just raw value)
StartStopCount - total start/stop (power cycle) count
BadSectorCount - total bad sector count displayed in the text description
WeakSectorCount - total weak / pending sector count displayed in the text description
SpinRetryCount - total spin retries count displayed in the text description
CommunicationIssueCount - total data communication problems displayed in the text description
StatusCode - disk status:

0 = unknown
1 = perfect (no problems found)
other values work as a bit mask, so all problems (if found) added. Generally larger number means more and more serious problems
2 = communication problems found
4 = weak sectors found
8 = bad sectors found
16 = spin up problems found
32 = health of the disk is low (below 25%)
64 = failure predicted (health is 0%)

TRIMStatus - status of TRIM function

0 = TRIM not available
1 = TRIM available and working
2 = TRIM available but not working (may be limited by driver as described at www.hdsentinel.com/faq.php#trim )

SMART - complete S.M.A.R.T. status of the drive, in text format. Each lines contain 1-1 attributes and the attribute fields are separated by , (comma) and appears as on the S.M.A.R.T. page (ID, name, threshold, value, worst, status flags, raw data)

Maybe this helps ;)

Please let me know your thoughts, experiences, possible suggestions for further improvements.
mnaim
Posts: 8
Joined: 2017.02.10. 12:00

Re: WMI support? Yes please!

Post by mnaim »

Nice, great extension.
Maybe one suggestion, SMART could be implemented as WMI array instead of string, better for script parsing.

I like new values BadSectorCount and StatusCode, these are crucial for monitoring.
mnaim
Posts: 8
Joined: 2017.02.10. 12:00

Re: WMI support? Yes please!

Post by mnaim »

Some advanced features suggestions.
1)WMI supports methods on items, so at the end this interface could be used to trigger HD self test, or surface test...
2)There could be item "System or Total" that could represent all disk summary status.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

Thanks for the suggestion, I'll check the possibilities ;)
Wanted to make easier and simpler to make display/parsing easier even from scripts.

As previously suggested, there are direct values (like the StatusCode and BadSectorCount) for quick check - but if somebody is interested in the details, he can parse the complete S.M.A.R.T. information too.
User avatar
hdsentinel
Site Admin
Posts: 3115
Joined: 2008.07.27. 17:00
Location: Hungary
Contact:

Re: WMI support? Yes please!

Post by hdsentinel »

Thanks for the tips, yes, there may be additional details / possibilities in later versions ;)
Post Reply