Add support for additional SMART attributes
All checks were successful
Build and Release / build-and-release (push) Successful in 1m30s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m30s
- Support Temperature_Case attribute for Intel SSDs - Support Media_Wearout_Indicator attribute for wear percentage - Parse wear value from column 3 (VALUE) for Media_Wearout_Indicator - Fixes temperature and wear display for Intel PHLA847000FL512DGN drives
This commit is contained in:
parent
4f80701671
commit
d5ce36ee18
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -301,7 +301,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -324,7 +324,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard-shared"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"serde",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -471,7 +471,7 @@ impl DiskCollector {
|
||||
}
|
||||
|
||||
// Temperature parsing for different drive types
|
||||
if line.contains("Temperature_Celsius") || line.contains("Airflow_Temperature_Cel") {
|
||||
if line.contains("Temperature_Celsius") || line.contains("Airflow_Temperature_Cel") || line.contains("Temperature_Case") {
|
||||
// Traditional SATA drives: attribute table format
|
||||
if let Some(temp_str) = line.split_whitespace().nth(9) {
|
||||
if let Ok(temp) = temp_str.parse::<f32>() {
|
||||
@ -489,7 +489,15 @@ impl DiskCollector {
|
||||
}
|
||||
|
||||
// Wear level parsing for SSDs
|
||||
if line.contains("Wear_Leveling_Count") || line.contains("SSD_Life_Left") {
|
||||
if line.contains("Media_Wearout_Indicator") {
|
||||
// Media_Wearout_Indicator stores remaining life % in column 3 (VALUE)
|
||||
if let Some(wear_str) = line.split_whitespace().nth(3) {
|
||||
if let Ok(remaining) = wear_str.parse::<f32>() {
|
||||
wear_percent = Some(100.0 - remaining); // Convert remaining life to wear
|
||||
}
|
||||
}
|
||||
} else if line.contains("Wear_Leveling_Count") || line.contains("SSD_Life_Left") {
|
||||
// Other wear attributes store value in column 9 (RAW_VALUE)
|
||||
if let Some(wear_str) = line.split_whitespace().nth(9) {
|
||||
if let Ok(wear) = wear_str.parse::<f32>() {
|
||||
wear_percent = Some(100.0 - wear); // Convert remaining life to wear
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-shared"
|
||||
version = "0.1.157"
|
||||
version = "0.1.158"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user