Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Linux hardware - De...
 
Notifications
Clear all

[Solved] Linux hardware - Determine SSD health

1 Posts
1 Users
0 Reactions
9 Views
 Hans
(@hans)
Famed Member Admin
Joined: 13 years ago
Posts: 3155
Topic starter   [#1584]

Linux for the win again, to determine the health status of your SSD.

First you may need to install smartctl (it seems default installed on a Proxmox server):

sudo apt install smartmontools

 

Next we need to determine the device of our SSD.
I used this command for that:

lsblk -o NAME,SIZE,MODEL,TRAN

The output lists something like this:

NAME                           SIZE MODEL               TRAN
nvme0n1                      953.9G Lexar SSD NM790 1TB nvme
├─nvme0n1p1                   1007K                     nvme
├─nvme0n1p2                      1G                     nvme
└─nvme0n1p3                  952.9G                     nvme
  ├─pve-swap                     8G                     
  ├─pve-root                   200G                     
  ├─pve-data_tmeta             6.5G                     
  │ └─pve-data-tpool           637G                     
  │   ├─pve-data               637G                     
  │   ├─pve-vm--301--disk--0     4G               
...

Here "nvme0n1" is the device I was looking for. In command line we address it by adding "/dev/" in front of it:

/dev/nvme0n1

To check the health of this device run this (may need "sudo" depending how you're logged in, with proxmox I didn't need "sudo"):

smartctl -H /dev/nvme0n1

A simple output tells you if your SSD is still healthy:

smartctl 7.5 2025-04-30 r5714 [x86_64-linux-7.0.2-6-pve] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

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

To see much more detail, you can try this:

smartctl -a /dev/nvme0n1

Which produces an output like this:

smartctl 7.5 2025-04-30 r5714 [x86_64-linux-7.0.2-6-pve] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Lexar SSD NM790 1TB
Serial Number:                      PCJ422W192437P220J
Firmware Version:                   18950
PCI Vendor/Subsystem ID:            0x1d97
IEEE OUI Identifier:                0xcaf25b
Total NVM Capacity:                 1,024,209,543,168 [1.02 TB]
Unallocated NVM Capacity:           0
Controller ID:                      0
NVMe Version:                       2.0
Number of Namespaces:               1
Namespace 1 Size/Capacity:          1,024,209,543,168 [1.02 TB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            caf25b 04100018f5
Local Time is:                      Thu Aug 27 11:53:54 2026 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 (0x0e):         Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     90 Celsius
Critical Comp. Temp. Threshold:     95 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.50W       -        -    0  0  0  0        0       0
 1 +     5.80W       -        -    1  1  1  1        0       0
 2 +     3.60W       -        -    2  2  2  2        0       0
 3 -   0.0500W       -        -    3  3  3  3     5000   10000
 4 -   0.0025W       -        -    4  4  4  4     8000   45000

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, NSID 0xffffffff)
Critical Warning:                   0x00
Temperature:                        34 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    26%
Data Units Read:                    399,470,682 [204 TB]
Data Units Written:                 403,153,384 [206 TB]
Host Read Commands:                 6,512,044,074
Host Write Commands:                4,508,806,521
Controller Busy Time:               16,167
Power Cycles:                       21
Power On Hours:                     16,419
Unsafe Shutdowns:                   13
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    5796
Critical Comp. Temperature Time:    1082
Temperature Sensor 1:               34 Celsius
Temperature Sensor 2:               48 Celsius
Thermal Temp. 1 Total Time:         2

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

Self-test Log (NVMe Log 0x06, NSID 0xffffffff)
Self-test status: No self-test in progress
No Self-tests Logged

Looks healthy to me (No Errors Logged, available spare 100%), not too thrilled about the "unsafe shutdowns" but that is my own doing 😉 



   
ReplyQuote
Share: