I'm writing a disk monitoring application for Windows that I'm almost finished with. The monitoring code isn't done, but the drive properties feature is, and some of the geeks here might find it useful as-is, and maybe give me some feedback.
It shows almost all the information that it's possible to gather about IDE / USB / Flash drives (no SCSI yet), including the SMART attributes (if the drive supports it) , all the WMI (windows management intstrumentation) info, drive geometry, adapter information, SMART ID (model number, serial number, firmware revision), supported ATA standard and so on and so forth.
Just from writing the code I've already discovered my SATA drive will probably fail in the next month due to excessive recoverable read errors.
System Requirements: Windows XP / Server 2003 with the .NET 2.0 framework installed.
When the program comes up, just double click on a drive (or use the context menu) to see all the drive's information. It's also a non-invasive, read-only application, so there's no chance of it hosing a drive.
So if anyone wants to play with it and see their IDE drive's temperature or any other geeky information about their fixed drives, download it from.
http://www.itcpos.com/setuptray.zip
The production version will probably be "nagware", but for now it's free. Enjoy!
Disk Utility
-
- Grand Pontificator
- Posts: 3015
- Joined: Thu Mar 13, 2003 5:35 pm
Disk Utility
My blogs: Nerd Jargon | Coder's Kitchen | The Outdoor Nerd
Internet Consulting: NorthWeb Technologies
Internet Consulting: NorthWeb Technologies
-
- Grand Pontificator
- Posts: 3015
- Joined: Thu Mar 13, 2003 5:35 pm
A few notes:
-- It uses a windows installer so it's easy to remove . It puts a 'Drive Monitor' icon on your desktop.
-- The installer will prompt you to install the .NET 2.0 framework if you don't have it.
-- It's a windows tray application, so to exit you have to right click on the tray icon (a little disk drive) and choose 'Exit'.
-- There's some vendor-specific SMART code quirks in it that need to be resolved. For example it reports the drive temperature on the wife's laptop (Hitachi drive) as 253 degrees C, which is clearly wrong (/rude hitachi).
-- It can't read the SMART info off an ATA drive mounted in a USB enclosure. To the best of my knowledge nothing can (until the next USB standard). I think the industry might be coming out with an ATA pass through standard to get around that though...
-- All the icons were pillaged from google image, so if any graphic artists out there want to give me a bid on an icon set, lemme know.
-- I'm leaving town Sunday, so it might be a few days before I check back.
-- It uses a windows installer so it's easy to remove . It puts a 'Drive Monitor' icon on your desktop.
-- The installer will prompt you to install the .NET 2.0 framework if you don't have it.
-- It's a windows tray application, so to exit you have to right click on the tray icon (a little disk drive) and choose 'Exit'.
-- There's some vendor-specific SMART code quirks in it that need to be resolved. For example it reports the drive temperature on the wife's laptop (Hitachi drive) as 253 degrees C, which is clearly wrong (/rude hitachi).
-- It can't read the SMART info off an ATA drive mounted in a USB enclosure. To the best of my knowledge nothing can (until the next USB standard). I think the industry might be coming out with an ATA pass through standard to get around that though...
-- All the icons were pillaged from google image, so if any graphic artists out there want to give me a bid on an icon set, lemme know.
-- I'm leaving town Sunday, so it might be a few days before I check back.
My blogs: Nerd Jargon | Coder's Kitchen | The Outdoor Nerd
Internet Consulting: NorthWeb Technologies
Internet Consulting: NorthWeb Technologies
-
- Grand Inspector Inquisitor Commander
- Posts: 2636
- Joined: Fri Dec 20, 2002 9:42 pm
I'll have to take a look at this. It sounds cool.
SpeedFan has a utility to do this too, and you can compare your drive stats to the normal stats of the drive. It's interesting to see how many read errors and such are considered "normal".
http://www.almico.com/speedfan.php
SpeedFan has a utility to do this too, and you can compare your drive stats to the normal stats of the drive. It's interesting to see how many read errors and such are considered "normal".
http://www.almico.com/speedfan.php
Bahd Zoolander - Transcendent - On Vacation
-
- Save a Koala, deport an Australian
- Posts: 17517
- Joined: Thu Jan 02, 2003 3:00 pm
- Location: Straya mate!
- Contact:
There's some interesting discrepancies between Smartfan and your utility on my laptop, particularly the reallocated sector count. The raw value is 0x07D000000000, which Smartfan reads as "0", but yours doesn't.
Similarly, temperature returns a raw value of 0x004A0012003C, which is apparently 56C, again yours has issues with that value.
I'd prefer the installer gave me an option of whether to put stuff in the start menu, or desktop, or quicklaunch. Personally I prefer a clean desktop with everything in the Start Menu. Took me a bit to figure you didn't put anything there. An uninstall link in the start menu is nice too (saves loading the add/remove box).
You should ngen the app on install. Improves startup time. :)
Tooltip icon needs to be more distinctive. Hard to tell what a little box is really doing there at a glance. Similarly, the tooltip should actually give reasonable information, not just tell you what the icon is.
Any chance of getting the NTFS version of the drive, or any other arcane NTFS style info? Don't wanna get into that level of FS hackery?
It doesn't work on a 64 bit system. I suspect it's because you need to mark your app as "x86", not "Any CPU" when you're using interop to native code.
Might wanna run it through dotfuscator too when you finally release. Poking around your source with Reflector is fun! ;)
Dd
Similarly, temperature returns a raw value of 0x004A0012003C, which is apparently 56C, again yours has issues with that value.
I'd prefer the installer gave me an option of whether to put stuff in the start menu, or desktop, or quicklaunch. Personally I prefer a clean desktop with everything in the Start Menu. Took me a bit to figure you didn't put anything there. An uninstall link in the start menu is nice too (saves loading the add/remove box).
You should ngen the app on install. Improves startup time. :)
Tooltip icon needs to be more distinctive. Hard to tell what a little box is really doing there at a glance. Similarly, the tooltip should actually give reasonable information, not just tell you what the icon is.
Any chance of getting the NTFS version of the drive, or any other arcane NTFS style info? Don't wanna get into that level of FS hackery?
It doesn't work on a 64 bit system. I suspect it's because you need to mark your app as "x86", not "Any CPU" when you're using interop to native code.
Might wanna run it through dotfuscator too when you finally release. Poking around your source with Reflector is fun! ;)
Dd
-
- Grand Pontificator
- Posts: 3015
- Joined: Thu Mar 13, 2003 5:35 pm
Most apps translate some of the raw values. For now, mine reports exactly what the drive gives me, which agrees with other utilties I'm using to test with. I'm getting the right values, it's just a matter of correctly interpreting them. I'll probably base the translation on the open source tool called smartmontool.There's some interesting discrepancies between Smartfan and your utility on my laptop, particularly the reallocated sector count. The raw value is 0x07D000000000, which Smartfan reads as "0", but yours doesn't.
The temp attribute (194, 0xC2 hex) is where some vendors are wonky. The ATA spec says the value of this attr (not the raw value) is supposed to be the temp C, but some vendors don't adhere to that, and looks like they encode it into the raw value.Similarly, temperature returns a raw value of 0x004A0012003C, which is apparently 56C, again yours has issues with that value.
The installer was a quick 10 minute job. It still needs some work, and I intend to fluff it out.I'd prefer the installer gave me an option of whether to put stuff in the start menu, or desktop, or quicklaunch. Personally I prefer a clean desktop with everything in the Start Menu. Took me a bit to figure you didn't put anything there. An uninstall link in the start menu is nice too (saves loading the add/remove box).
Not sure what you mean, and never heard of ngen. The slow startup time is mainly because of it having to read the physical sectors and the WMI information, which Windows can't cache becuase it's real-time info.You should ngen the app on install. Improves startup time.![]()
A very good chance. The app I posted here is the get-something-to-sell-quickly version. I have a "disk workbench" type app which will repair, stress test, analyze, recover and image all manner of fixed disk drives. It's like ghost, partition magic, and a smart tool all rolled into one. The "big tool" already shows all the MBR and partition info, which I'm still deciding if I want to show it in the monitor.Any chance of getting the NTFS version of the drive, or any other arcane NTFS style info? Don't wanna get into that level of FS hackery?
Also, WMI can tell me more information about the controller which I'm not currently capturing, like whether its PATA or SATA and whether the drive is running in PIO or UDMA mode.
I'm also going to put Windows WMI performance statistics in both apps. The performance slowly getting worse is the #1 indicator of a failing drive.
Thanks for pointing that out!It doesn't work on a 64 bit system. I suspect it's because you need to mark your app as "x86", not "Any CPU" when you're using interop to native code.
Not sure if I care since the low level disk code is in a C++ COM control. Most of what you'll see in the .NET code is just filling list boxesMight wanna run it through dotfuscator too when you finally release. Poking around your source with Reflector is fun!![]()

My blogs: Nerd Jargon | Coder's Kitchen | The Outdoor Nerd
Internet Consulting: NorthWeb Technologies
Internet Consulting: NorthWeb Technologies
-
- Grand Pontificator
- Posts: 3015
- Joined: Thu Mar 13, 2003 5:35 pm
Oh and the tool tip in the tray icon isn't implemented yet.
It's going to show the drive status for each drive (currently just shown in the window) based on:
1.) The WMI status code.
2.) The SMART status code, if available.
3.) My own algorithms for deciding if the MBR, partition table, partition boot sectors and file system objects are valid.
I'm currently working on an XML-based history object, which will track the status and performance over time to spot trends in what the drive is doing and show a fancy graph to the user (which I noticed that ActiveSMART does).
I'm also working on some Ring 0 (kernel) access code to get some more info from the BIOS and ATA controller, but I read somewhere that Vista won't let you use those kernel tricks, so I'm undecided.
It's going to show the drive status for each drive (currently just shown in the window) based on:
1.) The WMI status code.
2.) The SMART status code, if available.
3.) My own algorithms for deciding if the MBR, partition table, partition boot sectors and file system objects are valid.
I'm currently working on an XML-based history object, which will track the status and performance over time to spot trends in what the drive is doing and show a fancy graph to the user (which I noticed that ActiveSMART does).
I'm also working on some Ring 0 (kernel) access code to get some more info from the BIOS and ATA controller, but I read somewhere that Vista won't let you use those kernel tricks, so I'm undecided.
My blogs: Nerd Jargon | Coder's Kitchen | The Outdoor Nerd
Internet Consulting: NorthWeb Technologies
Internet Consulting: NorthWeb Technologies
-
- Save a Koala, deport an Australian
- Posts: 17517
- Joined: Thu Jan 02, 2003 3:00 pm
- Location: Straya mate!
- Contact:
That depends a lot on exactly what sort of thing you're trying to do in the kernel, and whether you're 32 or 64 bit. The 32 bit kernel still lets you do quite a bit in Vista - they couldn't change too much without destroying backward compatibility completely. 64 bit is considered a clean slate, so even in XP there's a bunch of protection on system calls and the like (write a 64 bit driver, hook a system call, boom - blue screen).I'm also working on some Ring 0 (kernel) access code to get some more info from the BIOS and ATA controller, but I read somewhere that Vista won't let you use those kernel tricks, so I'm undecided.
The big thing in Vista is you really need a signing certificate from Microsoft. It's not a big deal to get (get a code signing cert from Verisign, give cert to MS, MS gives you a cert back). The downside, from what I hear, is how it all plays in with Vista's built in DRM shenanigans - drivers can end up flagging the system as "untrusted", and result in any DRM'd stuff to stop working properly.
Still, I'd imagine all you're doing is writing a quick little driver which handles a few IOCTLs and doesn't actually layer onto anything in the stack or actually hook anything. It's unlikely that will cause any real issues in Vista as long as you have a signing cert.
Dd
-
- Grand Pontificator
- Posts: 3015
- Joined: Thu Mar 13, 2003 5:35 pm
I put a new version up that lets you save the drive information as an XML file. It captures the whole shebang, including the MBR and partition boot records.
The overall design is turning out well. Next up is a web service that will take that XML (minus any personally identifiable info) and add it to the database of known drives, as well as being able to provide a premium type of analysis. Something like the user agress to allow it to submit drive data in exchange for access to the database. The user could see jumper settings, spec sheets, etc. from a central database.
I probably won't fuck around with the kernel for this product. The last thing I want is a blue screen of death from a program that's suppose to make the system *more* stable. That's why I've done as much as possible in managed code.
The overall design is turning out well. Next up is a web service that will take that XML (minus any personally identifiable info) and add it to the database of known drives, as well as being able to provide a premium type of analysis. Something like the user agress to allow it to submit drive data in exchange for access to the database. The user could see jumper settings, spec sheets, etc. from a central database.
I probably won't fuck around with the kernel for this product. The last thing I want is a blue screen of death from a program that's suppose to make the system *more* stable. That's why I've done as much as possible in managed code.
My blogs: Nerd Jargon | Coder's Kitchen | The Outdoor Nerd
Internet Consulting: NorthWeb Technologies
Internet Consulting: NorthWeb Technologies