Como posso verificar as horas de ativação em uma linha de comando?
Você pode fazer isso usando DiskSmartView de Nirsoft em um arquivo em lotes.
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
Exemplo de saída:
> GetDiskPowerOnHours
Disk Number: 0
Power-On Hours (POH): 13245
Disk Number: 1
Power-On Hours (POH): 0
Disk Number: 2
Notas:
- Nem todas as unidades armazenam as horas de ativação
- Tendo dito que o Power-On Hours não é um indicador útil de falha no disco rígido (veja abaixo)
Uma solução melhor
Use um programa de monitoramento SMART que irá avisá-lo sobre possíveis problemas.
Existem muitos disponíveis, incluindo:
-
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.
-
Saúde do HDD
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.
-
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.
-
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.
Previsão de falha no disco rígido
Uma empresa chamada Backblaze coletou dados sobre falhas no disco rígido. Ele divulgou esses dados em blogs da empresa, destacando quais drives do fabricante falharam com mais frequência que outros.
Em Hard Drive SMART Stats , ele publicou dados indicando exatamente quais 5 atributos SMART indicam iminente falha na unidade:
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.
O artigo continua sugerindo:
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
Também do BackBlaze, e vale a pena lê-lo é um novo blog Quais estatísticas SMART Conte-nos sobre os discos rígidos .
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.
Fonte DiskSmartView
Aviso de isenção
Eu não sou afiliado com Nirsoft de qualquer forma, eu sou apenas um usuário final de seu software.
Leitura Adicional
- Um índice A-Z da linha de comando do Windows CMD
- Uma lista categorizada de comandos do Windows CMD
- para / f - Comando Loop contra os resultados de outro comando.
- if - Realize condicionalmente um comando.