Windows-Skript für jetzt Stunden Ihres HardDrive

1014
Arcanne

Ich möchte ein Skript erstellen, das die Betriebsstunden der Festplatte prüft, um den Verlust von Informationen zu verhindern. Gibt es eine Möglichkeit, dies zu tun? Ich habe im Internet nachgesehen, finde aber keinen Batchbefehl. Danke für die Hilfe !

(PS: Entschuldigung für mein schlechtes Englisch.)

1
Wie soll es funktionieren und wie würde es helfen? styrofoam fly vor 6 Jahren 0
Die Betriebsstunden eines Laufwerks hängen so wenig mit den Ausfallraten zusammen, dass es keinen sinnvollen Weg gibt, einen Ausfall anhand von Stunden vorherzusagen. Sie können nicht zuverlässig raten, wann ein Laufwerk ausfällt. ** Sie können nur sicherstellen, dass Sie über Sicherungen verfügen. ** Bob vor 6 Jahren 0
Sie versuchen wahrscheinlich, die SMART-Parameter von "Power_On_Hours" anzuzeigen, obwohl dies nichts mit Datenverlust zu tun hat. Ave vor 6 Jahren 0
Ich möchte das Skript vielleicht jeden Montag starten. Jetzt wird die Festplatte nicht mehr geschützt, aber wenn er 10.000 Stunden erreicht, besteht ein höheres Risiko, dass er bricht Arcanne vor 6 Jahren 0
Ich habe bei 20 000 Stunden Platten, die in einwandfreiem Zustand sind, während einige mit weniger als 5 000 aufgegeben haben. Wenn Sie andere Fehler überprüfen möchten, finden Sie weitere Informationen unter: https://www.backblaze.com/blog/what-smart-stats-indicate-hard-drive-failures/ Das von ihnen verwendete Werkzeug ist Smartmontools. satibel vor 6 Jahren 0
Es gibt keine Möglichkeit, dies über die Befehlszeile zu tun. EDIT: Ich werde Smartmontools versuchen, danke Arcanne vor 6 Jahren 0
* Überprüfen Sie die Betriebsstunden des Festplattenlaufwerks, um den Verlust von Informationen zu verhindern. * ... Wenn Sie Datenverlust verhindern möchten, müssen Sie, wie bereits erwähnt, Ihre Daten in den Intervallen sichern, die Sie für das Risiko benötigen, das Sie eingehen möchten . Wenn Sie riskieren könnten, 24 Stunden alte Daten zu verlieren und keine Katastrophe zu erleiden, dann führen Sie einmal pro Tag eine vollständige Sicherung durch. Andernfalls sollten Sie die Sicherung häufiger durchführen, je nachdem, was Sie riskieren können. Wenn diese Daten äußerst wichtig sind, können Sie zusätzlich (zusätzlich zum Sichern Ihrer Daten in geplanten Intervallen) die Verwendung von [RAID] (https://en.wikipedia.org/wiki/RAID) und nicht von RAID 0 in Betracht ziehen. Pimp Juice IT vor 6 Jahren 0

1 Antwort auf die Frage

2
DavidPostill

How can I check Power-On Hours from a command line?

You can do this using DiskSmartView from Nirsoft in a batch file.

GetDiskPowerOnHours.cmd:

@echo off setlocal enabledelayedexpansion rem get report using disksmartview from nirsoft disksmartview /scomma smart.txt for /f "usebackq tokens=1,2 delims=," %%l in (`type smart.txt`) do ( if "%%l" EQU "Disk Number" ( echo %%l: %%m ) if "%%l" EQU "Power-On Hours (POH)" ( echo %%l: %%m ) ) endlocal 

Example output:

> GetDiskPowerOnHours Disk Number: 0 Power-On Hours (POH): 13245 Disk Number: 1 Power-On Hours (POH): 0 Disk Number: 2 

Notes:

  • Not all drives store the Power-On Hours
  • Having said that Power-On Hours is not a useful indicator of hard disk failure (see below)

A Better Solution

Use a SMART monitoring program which will warn you advance of potential problems.

There are many available, including:

  • HDTune

    HD Tune Pro is a hard disk / SSD utility with many functions. It can be used to measure the drive's performance, scan for errors, check the health status (S.M.A.R.T.), securely erase all data and much more.

  • HDD Health

    HDD Health 4.2 with SSD drives support. HDD Health is a full-featured failure-prediction agent for machines using 2000, XP, Vista, Windows 7 and Windows 8. Sitting in the system tray, it monitors hard disks and alerts you to impending failure. The program uses Self Monitoring and Reporting Technology (S.M.A.R.T.) built into all new hard disks, and can predict failures on your hard drives. A host of alerting features include email, local pop-up messages, net messages, and event logging, while using no system resources.

  • HDD Expert

    HDDExpert gives you a crystal-clear vision of your Hard Drive (HDD or SSD) health and performance and translates S.M.A.R.T. attributes into readable indication. It then recommends maintenance (fans upgrade, spare purchase, backups and more) depending on the amount of failures detected on your hard drives.

  • Smartmontools

    The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA/SATA, SCSI/SAS and NVMe disks. In many cases, these utilities will provide advanced warning of disk degradation and failure. Smartmontools was originally derived from the Linux ​smartsuite package and actually supports ATA/ATAPI/SATA-3 to -8 disks and SCSI disks and tape devices. It should run on any modern Darwin (Mac OS X), Linux, FreeBSD, NetBSD, OpenBSD, Solaris, OS/2, Cygwin, QNX, eComStation or Windows system.


Predicting hard disk failure

A company called Backblaze has collected data on hard drive failures. It has released that data in company blogs, highlighting which manufacturer's drives failed more often than others.

In Hard Drive SMART Stats it published data indicating exactly which 5 SMART attributes indicate imminent drive failure:

From experience, we have found the following 5 SMART metrics indicate impending disk drive failure:

  • SMART 5 – Reallocated_Sector_Count.
  • SMART 187 – Reported_Uncorrectable_Errors.
  • SMART 188 – Command_Timeout.
  • SMART 197 – Current_Pending_Sector_Count.
  • SMART 198 – Offline_Uncorrectable.

We chose these 5 stats based on our experience and input from others in the industry because they are consistent across manufacturers and they are good predictors of failure.

The article goes on to suggest:

SMART 5: Reallocated_Sector_Count 1-4 keep an eye on it, more than 4 replace SMART 187: Reported_Uncorrect 1 or more replace SMART 188: Command_Timeout 1-13 keep an eye on it, more than 13 replace SMART 197: Current_Pending_Sector_Count 1 or more replace SMART 198: Offline_Uncorrectable 1 or more replace 

Also from BackBlaze, and worth reading is a newer blog What SMART Stats Tell Us About Hard Drives.


DiskSmartView

DiskSmartView is a small utility that retrieves the S.M.A.R.T information (S.M.A.R.T = Self-Monitoring, Analysis, and Reporting Technology) from IDE/SATA disks. This information includes the disk model/firmware/serial number, cylinders/heads, power-on hours (POH), internal temperature, disk errors rate, and more. You can use the S.M.A.R.T information retrieved by DiskSmartView to find out whether there is any significant problem in your disk drive.

Command-Line Options

  • /stext <Filename> Save the S.M.A.R.T information into a regular text file.
  • /stab <Filename> Save the S.M.A.R.T information into a tab-delimited text file.
  • /scomma <Filename> Save the S.M.A.R.T information into a comma-delimited text file (csv).
  • /stabular <Filename> Save the S.M.A.R.T information into a tabular text file.
  • /shtml <Filename> Save the S.M.A.R.T information into HTML file (Horizontal).
  • /sverhtml <Filename> Save the S.M.A.R.T information into HTML file (Vertical).
  • /sxml <Filename> Save the S.M.A.R.T information into XML file.

Source DiskSmartView


Disclaimer

I am not affiliated with Nirsoft in any way, I am just an end user of their software.


Further Reading

@Arcanne Answer aktualisiert mit einigen besseren Optionen für die Überwachung der SMART-Platte. DavidPostill vor 6 Jahren 0