Résolu le 24-01-22 Comment utilise t'on smartmontools?

Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Comment utilise t'on smartmontools?

Message par Frederix »

Comment utilise t'on smartmontools pour verifier ses storages? Je l'ai téléchargé sur la logitheque de Mint mais je n'arive pas même à le lancer ("commande non reconnue").
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

Merci. J'ai des "re-located sectors" est-ce à dire que mon disque est trop vieux, faut-il songer à le remplacer?

Code : Tout sélectionner

$ sudo /usr/sbin/smartctl -a /dev/sda
[sudo] Mot de passe de newman :     
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-58-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     SanDisk based SSDs
Device Model:     SanDisk SD7SB2Q512G1001
Serial Number:    160633400475
LU WWN Device Id: 5 001b44 4a46ee69f
Firmware Version: X2230001
User Capacity:    512 110 190 592 bytes [512 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Jan 24 13:56:37 2022 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(    0) seconds.
Offline data collection
capabilities: 			 (0x11) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					No Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  10) minutes.

SMART Attributes Data Structure revision number: 4
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032   100   100   ---    Old_age   Always       -       100
  9 Power_On_Hours          0x0032   253   100   ---    Old_age   Always       -       12432
 12 Power_Cycle_Count       0x0032   100   100   ---    Old_age   Always       -       2681
166 Unknown_Attribute       0x0032   100   100   ---    Old_age   Always       -       7
167 Unknown_Attribute       0x0032   100   100   ---    Old_age   Always       -       45
168 Unknown_Attribute       0x0032   100   100   ---    Old_age   Always       -       186
169 Unknown_Attribute       0x0032   100   100   ---    Old_age   Always       -       729
170 Unknown_Attribute       0x0032   100   100   ---    Old_age   Always       -       0
171 Program_Fail_Count      0x0032   100   100   ---    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   100   100   ---    Old_age   Always       -       0
173 Avg_Write/Erase_Count   0x0032   100   100   ---    Old_age   Always       -       72
174 Unexpect_Power_Loss_Ct  0x0032   100   100   ---    Old_age   Always       -       65
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   ---    Old_age   Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0032   100   100   ---    Old_age   Always       -       27974
184 End-to-End_Error        0x0032   100   100   ---    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   ---    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   ---    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   075   045   ---    Old_age   Always       -       25 (Min/Max 18/45)
199 UDMA_CRC_Error_Count    0x0032   100   100   ---    Old_age   Always       -       0
212 SATA_PHY_Error          0x0032   100   100   ---    Old_age   Always       -       0
230 Perc_Write/Erase_Count  0x0032   100   100   ---    Old_age   Always       -       552
232 Perc_Avail_Resrvd_Space 0x0033   100   100   004    Pre-fail  Always       -       100
233 Media_Wearout_Indicator 0x0032   100   100   ---    Old_age   Always       -       36539
241 Total_LBAs_Written      0x0030   253   253   ---    Old_age   Offline      -       3051
242 Total_LBAs_Read         0x0030   253   253   ---    Old_age   Offline      -       8091
244 Thermal_Throttle        0x0032   000   100   ---    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     12094         -
# 2  Short offline       Completed without error       00%     12023         -

Selective Self-tests/Logging not supported

newman@newman-HP-ProBook-450-G2:~$ 

PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

oui je voulais une confirmation, mon disque date, c'est un pc reconditionné dont j'ai dû changer la batterie déjà.
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

Pas de secteurs défectueux pourtant, je suis rassuré: Merci pour le lien c'est ce qu'il fallait.
Etape 1: install e2fsprogs

Code : Tout sélectionner

~$ sudo apt-get install e2fsprogs
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
e2fsprogs est déjà la version la plus récente (1.45.5-2ubuntu1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 412 non mis à jour.
Etape2: disque OK

Code : Tout sélectionner

$ sudo badblocks -v /dev/sda5 > bad-blocks
Vérification des blocs 0 à 499580927
Vérification des blocs défectueux (test en mode lecture seule) : 
complété                                                 
Passe complétée, 0 blocs défectueux repérés. (0/0/0 erreurs)
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

En l'occurence pour mon système l'étape 1 n'était pas nécessaire. Rétrospectivement je ne vois d'ailleurs pas le rapport entre e2fsprogs et badblocks, j'ai appliqué le tuto :)
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

J'y avais bien pensé mais je ne savais pas encore comment le savoir :) merci.
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

Merci pour smartmontools et aussi pour connaitre les fichiers qui sont dans un paquet (lien ci-dessus). A ce propos que fait la commande

Code : Tout sélectionner

sudo apt-file update
car elle est relativement longue à s'executer et je ne comprends pas ce qu'elle fait.
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

J'ai beaucoup d'erreur réseau pendant la commande et il me dit que j'en ai pour 4 à 22 heures restantes... Je vais devoir interrompre cette commande en cours pour réinitialiser ma connexion...
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

Bon ma connexion a été restaurée sans rebooter mais j'ai beaucoup d'erreurs:

Code : Tout sélectionner

Err :40 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
  Impossible d'initialiser la connexion à security.ubuntu.com: 80 (2001:67c:1562::18). - connect (101: Le réseau n'est pas accessible) Impossible d'initialiser la connexion à security.ubuntu.com: 80 (2001:67c:1562::15). - connect (101: Le réseau n'est pas accessible) Impossible d'initialiser la connexion à security.ubuntu.com: 80 (2001:67c:1360:8001::24). - connect (101: Le réseau n'est pas accessible) Impossible d'initialiser la connexion à security.ubuntu.com: 80 (2001:67c:1360:8001::23). - connect (101: Le réseau n'est pas accessible) [IP : 91.189.88.152 80]
Err :41 http:
Dois-je relancer la commande? Je ne sais pas si ces erreurs portent à conséquences puisque je ne sais pas ce que fais la commande.
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Avatar du membre
Frederix
Messages : 318
Enregistré le : mer. 29 déc. 2021 11:26
Localisation : région de Paris
Contact :

Re: Comment utilise t'on smartmontools?

Message par Frederix »

man et --help détaille la syntaxe de la commande sans dire simplement le but. J'ai traduit dans ma langue maternelle pour m'assurer que... je ne vois pas: elle met des fichiers à jour alors que le but était simplement de voir le contenu du paquet. contenant badblock. Dans le doute je ne relance pas la commande même si elle s'est mal passée.
PC moyen-tour: i3 10100F (10th gen.) à 3.6 Ghz socket LGA 1200, UDIMM 1.2v DDR4 16Gb 2666 Mhz, 2 HD 512 Gb, carte vidéo GeForce GT730 sous Linux Mint 21.1 Vera (Cinnamon) 64 bits, kernel 5.15.0.
Portable HP 450G2: i7-4510U à 2.00GHz, RAM 8 Gb, SSD interne 512Gb.
Connexion Internet par la fibre (SFR).
Répondre