Monitoraggio SMART di Hard Disk in Windows

From RVM Wiki
Revision as of 18:15, 16 February 2012 by Gabriele.vivinetto (talk | contribs) (Created page with "* Scaricare ed installare smartmontools: wget http://dfn.dl.sourceforge.net/project/smartmontools/smartmontools/5.42/smartmontools-5.42-1.win32-setup.exe smartmontools-5.42-1.…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • Scaricare ed installare smartmontools:
wget http://dfn.dl.sourceforge.net/project/smartmontools/smartmontools/5.42/smartmontools-5.42-1.win32-setup.exe
smartmontools-5.42-1.win32-setup.exe
  • Blat viene usato di default come mailer in windows. Scaricare blat per inviare le mail di avvertimento:
wget http://freefr.dl.sourceforge.net/project/blat/Blat%20Full%20Version/Blat%20v2.7.6/blat276.full.zip
  • Scompattare blat.{exe,dll,lib} in
%PROGRAMFILES%\smartmontools\bin\
  • Creare il file di configurazione di blat da importare nel registry:
notepad  %PROGRAMFILES%\smartmontools\bin\blat.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Public Domain\Blat]
"SMTP server"="Default.smtp.server.address"
"Sender"="Default.Sender@email.address"
"SMTP Port"="25"
"Try"="1"
  • Importare il file .reg
reg import "%PROGRAMFILES%\smarmontools\bin\blat.reg"
  • Impostare il mittente manualmente
reg.exe add "HKLM\SOFTWARE\Public Domain\Blat" /v Sender /d Default.Sender@email.address /f'
  • Modificare smartd.conf per
    • eseguire i test schedulati
    • mandare una mail giornaliera ai destinatari
    • mostrare un popup di avvertimento
notepad "%PROGRAMFILES%\smarmontools\bin\smartd.conf"
DEVICESCAN -a -o on -S on -s (S/../.././12|L/../../1/03) -M test -M daily -m sysmsgbox,recipient@example.com,otherrecipeitn@example.com
  • -M test: forza l'invio della mail di test
  • -M daily: invia email solo giornaliere
  • -m sysmsgbox: solo su windows mostra una popup (deve essere il primo destinatario)
  • -m recipient@example.com: manda la mail a quell'indirizzo
  • Installare il servizio smartd:
"%ProgramFiles%\smartmontools\bin\smartd.exe" install
  • Impostarne l apartenza in automatico:
sc config smartd start= auto
  • Avviare il servizio:
sc start smartd
  • Verificare che la mail arrivi e sia mostrata la finestra
  • Fermare il servizio
net stop smartd
  • Togliere -M test da smartd.conf
notepad "%PROGRAMFILES%\smarmontools\bin\smartd.conf"
DEVICESCAN -a -o on -S on -s (S/../.././12|L/../../1/03) -M daily -m sysmsgbox,recipient@example.com,otherrecipeitn@example.com
  • Avviare il servizio
net start smartd
  • Verificare che nell'event log sia loggato il detect dei dischi ed il servizio sia attivo con successo

Riferimenti