Skip to content

#61 SMART Error message table - #208

Open
JasmineRRod wants to merge 1 commit into
devfrom
smart-error-2
Open

#61 SMART Error message table#208
JasmineRRod wants to merge 1 commit into
devfrom
smart-error-2

Conversation

@JasmineRRod

@JasmineRRod JasmineRRod commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Added error log table for the NVMe drives:

image image image

Temperature: The primary temperature of the drive.

Available Spare: The percentage of remaining NAND blocks that the controller can substitute for worn-out blocks. It starts at 100% and decreases as the blocks retire.

Available Spare Threshold: The manufacturer-set floor for available spare. If the spare reaches this value, it is considered end-of-life to a NAND perspective.

Percentage Used: A percentage that records the cumulative endurance of the drive's life. 100% doesn't mean that the drive is dead — it means the warranty write endurance has been consumed.

Data Units Written: Total data written to the drive expressed in GB and the raw unit count (1 unit = 512,000 bytes ≈ 500 KB).

Data Units Read: The total data read from the drive, in GB, and the raw unit count (1 unit = 512,000 bytes ≈ 500 KB). High read counts are normal and don't wear NAND.

Host Write Commands: Total number of individual write commands issued by the host over the drive's lifetime.

Host Read Commands: Total number of individual read commands from the host.

Controller Busy Time: Total time (in minutes) the NVMe controller was actively processing I/O.

Power Cycles: Number of times the drive has been powered on and off.

Power On Hours: Total hours the drive has been powered on since manufacture.

Unsafe Shutdowns: Number of times the drive lost power without a clean shutdown sequence.

Media and Data Integrity Errors: Count of errors detected by the controller's ECC system that could not be recovered. This value should be 0; any nonzero number is a serious risk.

Error Information Log Entries: Number of entries in the NVMe Error Information Log. Each entry represents a command that completed with an error. A value that is not 0 should be investigated, but it is not considered as harmful as other errors.

Warning Composite Temp Time: Cumulative minutes the drive has operated above its Warning Composite Temperature (WCTEMP). Non-zero means the drive has been thermally stressed at some point in its life.

Critical Composite Temp Time: The cumulative minutes above the Critical Composite Temperature (CCTEMP).

Temperature Sensor N: Individual sensor readings (some drives expose 2–4 sensors covering different areas: NAND die, controller, board).

@JasmineRRod JasmineRRod added this to the 1.0.0 - portal release milestone Aug 10, 2026
@JasmineRRod
JasmineRRod requested review from a team and a lite review from Copilot August 10, 2026 06:11
@JasmineRRod JasmineRRod self-assigned this Aug 10, 2026
@JasmineRRod JasmineRRod added the enhancement New feature or request label Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the SMART tab UI to surface additional drive identity/health metadata and adds an NVMe-focused attributes table, backed by new JSON fields parsed from smartctl --json -a.

Changes:

  • Added new Drive Info fields (model family, drive type, SMART DB presence) and an ATA trip-temperature display.
  • Added a new “NVMe SMART Attributes” table section populated from the NVMe health log.
  • Extended SMART JSON parsing to include rotation_rate and in_smartctl_database.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
jdm-core/src/main/java/jdiskmark/SmartPanel.java Adds new labels/sections and populates a new NVMe attributes table in the SMART tab UI.
jdm-core/src/main/java/jdiskmark/Smart.java Adds parsed fields for rotation_rate and in_smartctl_database used by the SMART UI.
Suppressed comments (2)

jdm-core/src/main/java/jdiskmark/SmartPanel.java:670

  • tempTripValueLabel is never reset when the current SMART payload lacks a drive trip temperature (e.g., NVMe drives). This can leave a stale trip temperature from a prior ATA drive. Reset it before the temperature branch so each populate() reflects only current data.
        // Temperature — prefer top-level block, fall back to NVMe health log
        if (d.getTemperature() != null && d.getTemperature().getCurrent() != null) {
            int t = d.getTemperature().getCurrent();
            tempValueLabel.setText(t + " °C");
            tempValueLabel.setForeground(tempColor(t));

jdm-core/src/main/java/jdiskmark/SmartPanel.java:607

  • inDatabaseValueLabel is only updated when in_smartctl_database is present. If the field is absent in a later populate(), the label/colour can remain from the previous drive/session. Set text/foreground for the null case to avoid stale UI state.
        // in_smartctl_database: whether attribute names/thresholds are reliable
        if (d.getInSmartctlDatabase() != null) {
            boolean inDb = d.getInSmartctlDatabase();
            inDatabaseValueLabel.setText(inDb ? "Yes ✔" : "No — thresholds may be unreliable");
            inDatabaseValueLabel.setForeground(inDb ? null : new Color(0xFF9800));
        }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +596 to +600
// rotation_rate: 0 = SSD, >0 = HDD with that RPM, null = unknown
if (d.getRotationRate() != null) {
int rpm = d.getRotationRate();
driveTypeValueLabel.setText(rpm == 0 ? "SSD (non-rotating)" : "HDD (" + rpm + " RPM)");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JasmineRRod this sounds like a good suggestion to me

@jamesmarkchan jamesmarkchan changed the title #61 Error messages #61 SMART Error message table Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants