Menu

smartctl – sprawdzenie stanu dysku

2025-05-28 - Dysk

smartctl znajduje się w pakiecie: smartmontools
Instalacja narzędzia:

apt install smartmontools

Przykład użycia

smartctl -a /dev/nvme0

Wynik:

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.8.12-10-pve] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number: KINGSTON SA2000M8500G
Serial Number: 50026B7683EBAC0E
Firmware Version: S5Z42105
PCI Vendor/Subsystem ID: 0x2646
IEEE OUI Identifier: 0x0026b7
Controller ID: 1
NVMe Version: 1.3
Number of Namespaces: 1
Namespace 1 Size/Capacity: 500,107,862,016 [500 GB]
Namespace 1 Utilization: 48,426,926,080 [48.4 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 0026b7 683ebac0e5
Local Time is: Wed May 28 18:31:04 2025 CEST
Firmware Updates (0x14): 2 Slots, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x0f): S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size: 32 Pages
Warning Comp. Temp. Threshold: 75 Celsius
Critical Comp. Temp. Threshold: 80 Celsius

Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 9.00W – – 0 0 0 0 0 0
1 + 4.60W – – 1 1 1 1 0 0
2 + 3.80W – – 2 2 2 2 0 0
3 – 0.0450W – – 3 3 3 3 2000 2000
4 – 0.0040W – – 4 4 4 4 15000 15000

Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0

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

SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 27 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 1%
Data Units Read: 10,634,998 [5.44 TB]
Data Units Written: 11,754,952 [6.01 TB]
Host Read Commands: 147,390,147
Host Write Commands: 192,603,430
Controller Busy Time: 5,621
Power Cycles: 749
Power On Hours: 3,445
Unsafe Shutdowns: 60
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0

Error Information (NVMe Log 0x01, 16 of 256 entries)
No Errors Logged

Inne przykłady użycia:

smartctl -a /dev/sdX		      # Wyświetla pełne informacje SMART o dysku
smartctl -H /dev/sdX		      # Sprawdza ogólny stan zdrowia dysku
smartctl -t short /dev/sdX		# Uruchamia krótki test SMART
smartctl -t long /dev/sdX	    # Uruchamia pełny test (może trwać kilkadziesiąt minut)
smartctl -l error /dev/sdX		# Pokazuje dziennik błędów SMART
smartctl -s on /dev/sdX		   # Włącza obsługę SMART na dysku
smartctl -c /dev/sdX		      # Pokazuje możliwości testowe i status SMART dla dysku