[Updated on 12/06/13] - New package v6.1-3
SMART technology helps preventing data loss by monitoring your hard drives and predicting failures.
Tightly integrated into unix systems via smartmontools, it also exists for Windows systems, often already integrated into modern RAID controller frameworks, or available with free / paid diagnostic tools.
As i needed a tool to monitor hard disks, i begun writing an alternate installer for smartmontools under Windows, focused primary on mass deployment (unattended switches), but also with a nice GUI for end users, that includes sending mail alerts or local messages.
>> DOWNLOAD HERE <<
Please no direct links (this is a small server with limited bandwidth) but you're welcome to mirror
Based on smartmontools by Bruce Allen & Christian Franke, versionning follows linux naming conventions for packages, meaning the first version number is the upstream smartmontools version, the last digit is my installer's version.
it's daily usable, altough a bit too new to use it in critical enterprise environnments (currently, this works for myself, my company, and about 100 computers in companies i'm working for, including critical servers).
Although i don't provide commercial support, feel free to send me a mail if you encounter any bugs for limited support.
When launched without any command line arguments, it will show a simple GUI to configure SMART and alert options. When launched with the right arguments, a full unattended setup is performed. A basic install script would look like this:
@echo off
smartmontools-win-6.0-6.exe -f sourcemail@example.tld -t destinationmail@example.tld -s smtp.isp.com /silent
The last argument does not use the same input format because it's used directly by the installer core (Inno Setup), all other switches are used by my installer script. A full list of command line switches can be found in the README.TXT file that comes with the installer (allowing to configure everything the GUI can).
This project is fully GPLv2, based on well known opensource projects, including the following:
- Smartmontools by Bruce Allen, Christian Franke, Gabriele Pohl, Alex Samorukov, http://smartmontools.sourceforge.net
- Inno Setup by Jordan Russel, http://www.jrsoftware.org
- Sendemail by Brandon Zehm, http://caspian.dotconf.net/menu/Software/SendEmail
- Gzip by Free Software Foundation, Inc. Copyright (C) 1992, 1993 Jean-loup Gailly, http://gnuwin32.sourceforge.net/
Special thanks to Chistian Franke for his WTSSendMessage implementation.
Source code can be found here.
This project is translated in English, French and German, if you wish to help translating, please send me an email.



Have Fun :)

Commentaires
smartd.conf with [] bug? smartd -q showtests shows none.
C:\Program Files\smartmontools for Windows\bin>smartmontools-win-6.01-3.exe
C:\Program Files\smartmontools for Windows\bin>services.msc
When end of the generated smartd.conf was: (S/./././11|L/././[5]/12) then smartd -q showtests listed 0 (zero tests) scheduled (full transcript below).
When I replaced the [5] with .. to have (S/../.././11|L/../../6/13) then tests actually are scheduled:
Totals [Wed Dec 05 21:17:34 2012 CST - Tue Mar 05 21:17:34 2013 CST]:
Device: /dev/sda, will do 13 tests of type L
Device: /dev/sda, will do 90 tests of type S
Device: /dev/csmi2,0, will do 13 tests of type L
Device: /dev/csmi2,0, will do 90 tests of type S
Device: /dev/csmi2,0, will do 0 tests of type C
Device: /dev/csmi2,0, will do 0 tests of type O
Device: /dev/csmi2,1, will do 13 tests of type L
Device: /dev/csmi2,1, will do 90 tests of type S
Device: /dev/csmi2,1, will do 0 tests of type C
Device: /dev/csmi2,1, will do 0 tests of type O
C:\Program Files\smartmontools for Windows\bin>notepad smartd.conf
Below is full info on what I was using that generated smartd.conf with the [5] that seems to silently cause smartd to fail to run tests (I verified that the tests were not actually run, so it is correct in saying 0 (zero) tests scheduled.
C:\Program Files\smartmontools for Windows\bin>smartd -q showtests
smartd 6.0 2012-10-10 r3643 [i686-w64-mingw32-xp-sp3] (sf-6.0-1)
Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org
Opened configuration file C:/Program Files/smartmontools for Windows/bin/smartd.
conf
Configuration file C:/Program Files/smartmontools for Windows/bin/smartd.conf wa
s parsed, found DEVICESCAN, scanning devices
Device: /dev/sda, opened
Device: /dev/sda, [Intel Raid 1 Volume 1.0.], lu id: 0x44d063a700000000001517
ffff0aeb84, 251 GB
Device: /dev/sda, does not support SMART Self-Test Log.
Device: /dev/sda, is SMART capable. Adding to "monitor" list.
Device: /dev/csmi2,0, opened
Device: /dev/csmi2,0, WDC WD2503ABYX-01WERA1, S/N:WD-WMAYP4748856, WWN:5-0014ee-
0036b9475, FW:01.01S02, 251 GB
Device: /dev/csmi2,0, found in smartd database: Western Digital RE4 Serial ATA
Device: /dev/csmi2,0, is SMART capable. Adding to "monitor" list.
Device: /dev/csmi2,1, opened
Device: /dev/csmi2,1, WDC WD2503ABYX-01WERA1, S/N:WD-WMAYP4830290, WWN:5-0014ee-
0036b937b, FW:01.01S02, 251 GB
Device: /dev/csmi2,1, found in smartd database: Western Digital RE4 Serial ATA
Device: /dev/csmi2,1, is SMART capable. Adding to "monitor" list.
Monitoring 2 ATA and 1 SCSI devices
Next scheduled self tests (at most 5 of each type per device):
Totals [Wed Dec 05 21:09:25 2012 CST - Tue Mar 05 21:09:25 2013 CST]:
Device: /dev/sda, will do 0 tests of type L
Device: /dev/sda, will do 0 tests of type S
Device: /dev/csmi2,0, will do 0 tests of type L
Device: /dev/csmi2,0, will do 0 tests of type S
Device: /dev/csmi2,0, will do 0 tests of type C
Device: /dev/csmi2,0, will do 0 tests of type O
Device: /dev/csmi2,1, will do 0 tests of type L
Device: /dev/csmi2,1, will do 0 tests of type S
Device: /dev/csmi2,1, will do 0 tests of type C
Device: /dev/csmi2,1, will do 0 tests of type O
C:\Program Files\smartmontools for Windows\bin>type smartd.conf
# This is a generated smartd.conf file by smartmontools for Windows installer
# http://www.badministrateur.com
DEVICESCAN -H -l error -f -t -l selftest -I 194 -m console, -M exec "e
rroraction.cmd" -n sleep,7,q -s (S/./././11|L/././[5]/12)
C:\Program Files\smartmontools for Windows\bin>smartd -q onecheck
smartd 6.0 2012-10-10 r3643 [i686-w64-mingw32-xp-sp3] (sf-6.0-1)
Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org
Opened configuration file C:/Program Files/smartmontools for Windows/bin/smartd.
conf
Configuration file C:/Program Files/smartmontools for Windows/bin/smartd.conf wa
s parsed, found DEVICESCAN, scanning devices
Device: /dev/sda, opened
Device: /dev/sda, [Intel Raid 1 Volume 1.0.], lu id: 0x44d063a700000000001517
ffff0aeb84, 251 GB
Device: /dev/sda, does not support SMART Self-Test Log.
Device: /dev/sda, is SMART capable. Adding to "monitor" list.
I'll have a look
Thank you for pointing that out Bill, i'll have a look as soon as i'ill have a couple of seconds spare time and report back :)
smartd.conf has wrong number of dots in -s (S/./././9|L/./././10
I think, at least in some cases, the smartd.conf has wrong number of dots in schedule.
NOT OK: -s (S/./././9|L/./././10) (smartd -q showtests lists 0 tests scheduled)
OK: (S/../.././09|L/../.././10) (smartd -q showtests shows 93/91 tests scheduled)
To Manually edit: Start -> Run ->
Notepad "C:\Program Files\smartmontools for Windows\bin\smartd.conf"
To verify smartd.conf is ok:
"C:\Program Files\smartmontools for Windows\bin\smartd" -q showtests
Also suggest install default to "C:\Program Files\smartmontools-win" (or similar with NO spaces " " in path) instead of
C:\Program Files\smartmontools for Windows\
If no spaces in path, easier to script sanity check(s).
Btw
Fixed smartmontools for windows installer
Hello,
Sorry for being late. I uploaded a new version which should correct the issue you pointed out along with some others. Best regards.
6.0-5 smartmontools for Windows seems to fix bug in smartd.conf
Good work! 6.0-5 smartmontools for Windows seems to fix bug in smartd.conf with -s (wrong number of "." dots).
SANITY TEST (output of smartd -q showtests) is OK now!
C:\Program Files\smartmontools for Windows\bin>smartd -q showtests
smartd 6.0 2012-10-10 r3643 [i686-w64-mingw32-xp-sp3] (sf-6.0-1)
...
Totals [Thu Feb 07 20:20:28 2013 EST - Wed May 08 21:20:28 2013 EDT]:
Device: /dev/sda, will do 13 tests of type L
Device: /dev/sda, will do 90 tests of type S
Device: /dev/sda, will do 0 tests of type C
Device: /dev/sda, will do 0 tests of type O
One last request... maybe inno installer could create a file in install dir with version number, like: smartmontools-win-6.01-5.txt
I have another bugfix release upcomming this weekend
I have another bugfix (cosmetic fixes and documentation issues only) comming this weekend.
I will have the installer create a file called smartmontools-win-install.log including version information and installation date.
Is this alright for you ?
Perhaps smartmontools6.0-6install.log filname (with version)
Perhaps smartmontools6.0-6install.log (version in file name).
So no need to open smartmontools-win-install.log to find version.
Thanks, again!
Well okay
Thanks! smartmontools-install-6.0-6.log lets me know version!
02/19/2013 06:05 PM 21,057 smartmontools-install-6.0-6.log
I am not doing anything with the log... I just wanted an easy way to know what version I installed. And now the filename tells me the version installed. Thanks, again.
Prohibit Windows Bootup
When smartmontool is configured to report nonzero current pending sector (for example) and one or more of the HDD has such error, a reboot of Windows (I am using Win2008R2) will cause a pop up window to report the error. Problem is that this prohibit remote terminal access to the server until the pop-up window is dismissed directly on the console. This is causing problem for servers sitting in datacenter which administrators don't readily have physical access to the server. Work-around is to configure the smartmontool windows service as "Automatic (Delayed Start)".
use gmail as smtp
The email facility doesn't work with gmail because there is no option to to configure smtp port.
I did a few changes in erroraction.cmd in order to get it working.
in smtp server -s smtp.gmail.com:587, in username and password, -xu me@gmail.com, -xp MY-PASSWORD
Now it works like a charm.
Prohibit Windows Bootup
Hello,
I'll have some tests on my terminal servers and will most probably configure the smartmontools servce as delayed start. Anyway, Christian Franke from original smartmontools project changed it's implementation of notifications to ba able to communicate with terminal server sessions. These changes will be reflected into next version of my build.
A new vesion for smartmontools for windows 6.1 is on the way (i'm having holidays this week and will probably work on this).
Cheers.
use gmail as smtp
Hello,
You could actually write "smtp.gmail.com:587" directly when installing the software via GUI / CLI.
I'll document this on next version.
Cheers.
Ajouter un commentaire