Skript für S.M.A.R.T.-Werte (für DSM 7.2.1)

Sieht wohl so aus. Direkt über eine Freigabe im Editor geöffnet, ist die Ausgabe bis auf die Spaltenbreite der letzten Spalte ok.
 
Nix Mail. Direkt aus dem Log.
Hmm, das ist ja drollig...

Allerdings lass ich den Aufgabenplaner auch eine Mail senden. Ich denke mal, das hat dann mit der HTML-Darstellung zu tun. Das stell ich erstmal zurück. @BirdofPrey Danke, das bestätigt meine Vermutung.

Was die Breite angeht, kann ich ja erstmal ein if-Statement für Seagate einbauen.
 
Meine WDs erzeugen halt nicht solche "breiten" Daten. Aber wie gesagt, da baue ich erstmal einen Workaround. Und dann schau ich mal, ob ich das dynamisch machen kann...

Hätte ich doch blos nicht damit angefangen... :ROFLMAO:
 
  • Haha
Reaktionen: *kw*
Der Wert für "Head_Flying_Hours" sieht bei euch beiden auch unterschiedlich aus...

Oder sieht in SSH bei dir wieder "normal" aus @synfor ?
 
Meine Platten sind EXOS. Wird wohl daran liegen.
 
@synfor Sorry, du hattest das in eine Datei umgeleitet, hatte ich nicht dran gedacht...

Ich meine den Wert "Head_Flying_Hours", da steht ja bei dir das Ganze als Std, Min, Sek. Ich hatte die Hoffnung, dass der reine numerische Wert das "Normale" wäre. Aber ich denke @BirdofPrey hat recht, das wird an den unterschiedlichen Plattentypen liegen.
 
So, hab einfach die Formatierung der Tabelle geändert. Ich denke, das ist besser, als das Skript mit if-Statements vollzumüllen.

Das zip im Start-Post hab ich schon ausgetauscht.
 
  • Like
Reaktionen: *kw* und maxblank
Das Skript unterstützt im Moment WD und Seagate. Gibt es da auch was Ähnliches für Toshiba?
 
@mexl916 Mit dem aktuellen Skript sollte das jetzt egal sein. Die Werte für Pre-fail zieht das Skript aus smartctl selbst.

Also einfach mal testen, wäre auch für mich interessant...
 
Zuletzt bearbeitet:
  • Like
Reaktionen: mexl916
Hier die Ausgabe für Toshiba HDDs mit Script V1.1:

------------------------------------------------------------------------ Health status of internal HDD's: ------------------------------------------------------------------------ Drive /dev/sata1: === START OF INFORMATION SECTION === Model Family: MG07ACA Device Model: TOSHIBA MG07ACA12TE Serial Number: XXXXXXXXXXXXXXXX LU WWN Device Id: 5 000039 b48da220b Firmware Version: 0104 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sat Jan 13 16:42:53 2024 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 SMART Error Log Version: 1 No Errors Logged ID | Attribute | (1) | (2) | (3) | (4) =====|============================|=====|=====|=====|=================== 1 | Read_error_rate | 100 | 100 | 050 | 0 <! 2 | Throughput_performance | 100 | 100 | 050 | 0 <! 3 | Spin_up_time | 100 | 100 | 001 | 7271 <! 4 | Start/Stop_count | 100 | 100 | 000 | 578 5 | Reallocated_sector_count | 100 | 100 | 010 | 0 <! 7 | Seek_error_rate | 100 | 100 | 050 | 0 <! 8 | Seek_time_performance | 100 | 100 | 050 | 0 <! 9 | Power-on_hours_count | 100 | 100 | 000 | 343 10 | Spin_retry_count | 100 | 100 | 030 | 0 <! 12 | Drive_power_cycle_count | 100 | 100 | 000 | 575 23 | He_condition-1_(the_fall_direction)| 100 | 100 | 075 | 0 <! 24 | He_condition-2_(the_rise_direction)| 100 | 100 | 075 | 0 <! 191 | Shock_sense_count | 100 | 100 | 000 | 0 192 | Power-off_retract_count | 100 | 100 | 000 | 1 193 | Load/Unload_cycle_count | 100 | 100 | 000 | 578 194 | Temperature | 100 | 100 | 000 | 25 196 | Reallocated_sector_event_count| 100 | 100 | 000 | 0 197 | Current_pending_sector_count| 100 | 100 | 000 | 0 198 | Offline_scan_uncorrectable_sector_count| 100 | 100 | 000 | 0 199 | CRC_error_count | 200 | 200 | 000 | 0 220 | Disk_Shift | 100 | 100 | 000 | 135528449 222 | Loaded_hours | 100 | 100 | 000 | 343 223 | Load_retry_count | 100 | 100 | 000 | 0 224 | Load_friction | 100 | 100 | 000 | 0 226 | Load_in_time | 100 | 100 | 000 | 605 240 | DST_write_head_test_failure| 100 | 100 | 001 | 0 <! (1) Value, (2) Worst, (3) Threshold, (4) Raw, <! Pre-fail value ------------------------------------------------------------------------ Drive /dev/sata2: === START OF INFORMATION SECTION === Model Family: MG07ACA Device Model: TOSHIBA MG07ACA12TE Serial Number: XXXXXXXXXXXXXXXX LU WWN Device Id: 5 000039 b48da00a7 Firmware Version: 0104 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sat Jan 13 16:42:53 2024 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 SMART Error Log Version: 1 No Errors Logged ID | Attribute | (1) | (2) | (3) | (4) =====|============================|=====|=====|=====|=================== 1 | Read_error_rate | 100 | 100 | 050 | 0 <! 2 | Throughput_performance | 100 | 100 | 050 | 0 <! 3 | Spin_up_time | 100 | 100 | 001 | 7121 <! 4 | Start/Stop_count | 100 | 100 | 000 | 578 5 | Reallocated_sector_count | 100 | 100 | 010 | 0 <! 7 | Seek_error_rate | 100 | 100 | 050 | 0 <! 8 | Seek_time_performance | 100 | 100 | 050 | 0 <! 9 | Power-on_hours_count | 100 | 100 | 000 | 343 10 | Spin_retry_count | 100 | 100 | 030 | 0 <! 12 | Drive_power_cycle_count | 100 | 100 | 000 | 575 23 | He_condition-1_(the_fall_direction)| 100 | 100 | 075 | 0 <! 24 | He_condition-2_(the_rise_direction)| 100 | 100 | 075 | 0 <! 191 | Shock_sense_count | 100 | 100 | 000 | 0 192 | Power-off_retract_count | 100 | 100 | 000 | 1 193 | Load/Unload_cycle_count | 100 | 100 | 000 | 578 194 | Temperature | 100 | 100 | 000 | 24 196 | Reallocated_sector_event_count| 100 | 100 | 000 | 0 197 | Current_pending_sector_count| 100 | 100 | 000 | 0 198 | Offline_scan_uncorrectable_sector_count| 100 | 100 | 000 | 0 199 | CRC_error_count | 200 | 200 | 000 | 0 220 | Disk_Shift | 100 | 100 | 000 | 1703937 222 | Loaded_hours | 100 | 100 | 000 | 343 223 | Load_retry_count | 100 | 100 | 000 | 0 224 | Load_friction | 100 | 100 | 000 | 0 226 | Load_in_time | 100 | 100 | 000 | 596 240 | DST_write_head_test_failure| 100 | 100 | 001 | 0 <! (1) Value, (2) Worst, (3) Threshold, (4) Raw, <! Pre-fail value ------------------------------------------------------------------------
 
@mexl916 Prima, danke...

Da hat Toshiba aber ein paar schöne lange Attribut-Namen im Portfolio. Mal sehen, wie ich damit umgehe.
 
  • Haha
Reaktionen: ctrlaltdelete
@mexl916 Ich hab grad Version 1.2 angehängt, teste mal, wenn du magst.
 
  • Love
Reaktionen: maxblank
gern, Output für V1.2:

------------------------------------------------------------------------------- Health status of internal HDD's: ------------------------------------------------------------------------------- Drive /dev/sata1: === START OF INFORMATION SECTION === Model Family: MG07ACA Device Model: TOSHIBA MG07ACA12TE Serial Number: XXXXXXXXXXXXXXXXXXX LU WWN Device Id: 5 000039 b48da220b Firmware Version: 0104 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sat Jan 13 18:19:18 2024 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 SMART Error Log Version: 1 No Errors Logged ID | Attribute | (1) | (2) | (3) | (4) =====|===================================|=====|=====|=====|=================== 1 | Read_error_rate | 100 | 100 | 050 | 0 <! 2 | Throughput_performance | 100 | 100 | 050 | 0 <! 3 | Spin_up_time | 100 | 100 | 001 | 7271 <! 4 | Start/Stop_count | 100 | 100 | 000 | 578 5 | Reallocated_sector_count | 100 | 100 | 010 | 0 <! 7 | Seek_error_rate | 100 | 100 | 050 | 0 <! 8 | Seek_time_performance | 100 | 100 | 050 | 0 <! 9 | Power-on_hours_count | 100 | 100 | 000 | 345 10 | Spin_retry_count | 100 | 100 | 030 | 0 <! 12 | Drive_power_cycle_count | 100 | 100 | 000 | 575 23 | He_condition-1_(the_fall_dire... | 100 | 100 | 075 | 0 <! 24 | He_condition-2_(the_rise_dire... | 100 | 100 | 075 | 0 <! 191 | Shock_sense_count | 100 | 100 | 000 | 0 192 | Power-off_retract_count | 100 | 100 | 000 | 1 193 | Load/Unload_cycle_count | 100 | 100 | 000 | 578 194 | Temperature | 100 | 100 | 000 | 25 196 | Reallocated_sector_event_count | 100 | 100 | 000 | 0 197 | Current_pending_sector_count | 100 | 100 | 000 | 0 198 | Offline_scan_uncorrectable_se... | 100 | 100 | 000 | 0 199 | CRC_error_count | 200 | 200 | 000 | 0 220 | Disk_Shift | 100 | 100 | 000 | 135528449 222 | Loaded_hours | 100 | 100 | 000 | 345 223 | Load_retry_count | 100 | 100 | 000 | 0 224 | Load_friction | 100 | 100 | 000 | 0 226 | Load_in_time | 100 | 100 | 000 | 605 240 | DST_write_head_test_failure | 100 | 100 | 001 | 0 <! (1) Value, (2) Worst, (3) Threshold, (4) Raw, <! Pre-fail value ------------------------------------------------------------------------------- Drive /dev/sata2: === START OF INFORMATION SECTION === Model Family: MG07ACA Device Model: TOSHIBA MG07ACA12TE Serial Number: XXXXXXXXXXXXXXXXXXX LU WWN Device Id: 5 000039 b48da00a7 Firmware Version: 0104 User Capacity: 12,000,138,625,024 bytes [12.0 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 3.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-3 T13/2161-D revision 5 SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sat Jan 13 18:19:18 2024 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 SMART Error Log Version: 1 No Errors Logged ID | Attribute | (1) | (2) | (3) | (4) =====|===================================|=====|=====|=====|=================== 1 | Read_error_rate | 100 | 100 | 050 | 0 <! 2 | Throughput_performance | 100 | 100 | 050 | 0 <! 3 | Spin_up_time | 100 | 100 | 001 | 7121 <! 4 | Start/Stop_count | 100 | 100 | 000 | 578 5 | Reallocated_sector_count | 100 | 100 | 010 | 0 <! 7 | Seek_error_rate | 100 | 100 | 050 | 0 <! 8 | Seek_time_performance | 100 | 100 | 050 | 0 <! 9 | Power-on_hours_count | 100 | 100 | 000 | 345 10 | Spin_retry_count | 100 | 100 | 030 | 0 <! 12 | Drive_power_cycle_count | 100 | 100 | 000 | 575 23 | He_condition-1_(the_fall_dire... | 100 | 100 | 075 | 0 <! 24 | He_condition-2_(the_rise_dire... | 100 | 100 | 075 | 0 <! 191 | Shock_sense_count | 100 | 100 | 000 | 0 192 | Power-off_retract_count | 100 | 100 | 000 | 1 193 | Load/Unload_cycle_count | 100 | 100 | 000 | 578 194 | Temperature | 100 | 100 | 000 | 23 196 | Reallocated_sector_event_count | 100 | 100 | 000 | 0 197 | Current_pending_sector_count | 100 | 100 | 000 | 0 198 | Offline_scan_uncorrectable_se... | 100 | 100 | 000 | 0 199 | CRC_error_count | 200 | 200 | 000 | 0 220 | Disk_Shift | 100 | 100 | 000 | 1703937 222 | Loaded_hours | 100 | 100 | 000 | 345 223 | Load_retry_count | 100 | 100 | 000 | 0 224 | Load_friction | 100 | 100 | 000 | 0 226 | Load_in_time | 100 | 100 | 000 | 596 240 | DST_write_head_test_failure | 100 | 100 | 001 | 0 <! (1) Value, (2) Worst, (3) Threshold, (4) Raw, <! Pre-fail value -------------------------------------------------------------------------------
 
  • Like
Reaktionen: maxblank
@mexl916 Perfekt, danke.

Sehe noch, um eine Leerstelle hab ich mich vertan.

Edit sagt: Version 1.2.1 behebt auch das...
 
Zuletzt bearbeitet:
  • Like
Reaktionen: dil88
Neue Version 1.2.2: Unterdrückt die Serienummer der Platten (Es gibt extra einen Schalter in smartctl dafür)
 
  • Like
Reaktionen: dil88 und *kw*
Super, funktioniert prima!
 
  • Like
Reaktionen: Adama
@mexl916 danke für das Script.

Habe es heute mit auf meiner neuen DS923+ abgelegt und eine Aufgabe erstellt.
Das Ergebnis des Script is da, kann aber nicht per Email versendet werden, Fehlermeldung im Log. "Failed to send email. (501 Syntax error -line too long).

Ich verwende GMX mit folgenden Einstellungen:
SMTP: mail.gmx.net
SMTP Port: 587
Authentifizierung erforderlich: ja
Sicher Verbindung (SSL/TLS) erforderlich: ja
 
@mseidler Mal abgesehen davon, dass das Skript von mir ist ;) , andere Mails aus dem Aufgabenplaner gehen über dieses GMX-Konto?

Ich mail über ein Strato-Konto und da gibt es keine Probleme, die Skript-Ausgabe wird eins zu eins gesendet.
 
Zuletzt bearbeitet:

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat