total bytes written
smartctl -A /dev/nvme0 smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.19.0-1-amd64] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF SMART DATA SECTION === SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 49 Celsius Available Spare: 100% Available Spare Threshold: 10% Percentage Used: 0% Data Units Read: 5,736,028 [2.93 TB] Data Units Written: 6,598,129 [3.37 TB] Host Read Commands: 67,548,593 Host Write Commands: 113,248,572 Controller Busy Time: 0 Power Cycles: 530 Power On Hours: 5,184 Unsafe Shutdowns: 44 Media and Data Integrity Errors: 0 Error Information Log Entries: 0 Warning Comp. Temperature Time: 0 Critical Comp. Temperature Time: 0 用这个命令提取关键数据 smartctl -A /dev/nvme0 | /bin/awk '$0~/Written/{ print strftime("%Y-%m-%d %H:%M:%S"), $3,$4,$5$6}'
查看系统中的nvme
nvme list Node SN Model Namespace Usage Format FW Rev --------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- /dev/nvme0n1 LEN494R001122 KINGBANK KP230 Pro 1 1.02 TB / 1.02 TB 512 B + 0 B V1.9.0
也可以nvme命令 查看 smart信息, data_units_written就是写入数据
nvme smart-log /dev/nvme0 Smart Log for NVME device:nvme0 namespace-id:ffffffff critical_warning : 0 temperature : 50 C (323 Kelvin) available_spare : 100% available_spare_threshold : 10% percentage_used : 0% endurance group critical warning summary: 0 data_units_read : 5,736,025 data_units_written : 6,594,152 host_read_commands : 67,548,556 host_write_commands : 112,929,798 controller_busy_time : 0 power_cycles : 530 power_on_hours : 5,184 unsafe_shutdowns : 44 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0
距离 600TBW 还差得远