Quantcast
Channel: Microsoft forum - dslreports.com
Viewing all articles
Browse latest Browse all 8524

Quick, free and easy hard drive monitoring

$
0
0
So I run a Windows 2k8 server to store movies, music and other assorted files. I run this box 24/7 and it has two 4-terabyte drives in a spanned volume setup with zero fault tolerance. I chose this configuration for max storage capability and while understanding I would need to regularly backup the stuff in it, and I do. Despite my due diligence in backing it up, the fear does arise in losing one of the drives at any given moment. I do run this box without climate control, so when my place feels hot and humid, so does this server. Enter my very own quick and easy hard drive monitoring. Quick and easy HDD monitoring is nothing more than a batch file that calls two programs: smartmontools and SendEmail. smartmontools tests and queries the hard drives' current health, and sendemail sends me those results via email. I have the 2k8 server run the batch file automatically every week via Task Scheduler. The result? The hard drives now tell me how they're doing every week, without me having to ask. And if they tell me they're sick, I'll make sure to do another backup promptly and begin hard drive shopping soon thereafter. :) The batch file: @echo offecho.echo.echo This batch job runs the SMART HDD diagnostics tool to check hard driveecho health as reported by the drives, waits two minutes, collects the results,echo and emails it to you for your viewing pleasure and perusal.echo.echo.echo Setting some date parameters so the logs can be saved by scriptecho execution date. This will give you historical data you can use to referenceecho and gauge drive health.echo.echo.for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%cfor /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%afor /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%bset TODAY=%year%-%month%-%day%echo.echo.echo Now running SMART diagnostics. There's a 2-minute wait between each driveecho while test runs uninterrupted. Go have yourself a cup of coffee.echo.echo.cd \cd "c:\hdd_logs\smartmontools"smartctl.exe -t short /dev/sdatimeout 120smartctl.exe -t short /dev/sdbtimeout 120smartctl.exe -t short /dev/sdctimeout 120echo.echo.echo I'm now ready to gather the data from the SMART tests. Please stand by.echo.echo.cd \cd "c:\hdd_logs\smartmontools"smartctl.exe -x /dev/sda > "c:\hdd_logs\Logs\%TODAY%_HDD_A_log.txt"smartctl.exe -x /dev/sdb > "c:\hdd_logs\Logs\%TODAY%_HDD_B_log.txt"smartctl.exe -x /dev/sdc > "c:\hdd_logs\Logs\%TODAY%_HDD_C_log.txt"echo.echo.echo All done. Now I'm ready to email you the logs. Please stand by.echo.echo.cd \cd "c:\hdd_logs\sendmail"sendemail.exe -t yourrealemailaddress@youremailprovider.com -u SMART HDD diagnostics -m Please find attached your requested hard drive diagnostic logs -s yourispemailserver.com:25 -f noreply@anyemailyouchoose.com -a "c:\hdd_logs\logs\%TODAY%_HDD_A_log.txt" "c:\hdd_logs\logs\%TODAY%_HDD_B_log.txt" "c:\hdd_logs\logs\%TODAY%_HDD_C_log.txt"echo.echo.echo Have a nice day!echo.echo.

Viewing all articles
Browse latest Browse all 8524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>