Skip to content

nvme: add monitor plugin - #3865

Open
dwsuse wants to merge 2 commits into
linux-nvme:masterfrom
dwsuse:nvme-ocp
Open

nvme: add monitor plugin#3865
dwsuse wants to merge 2 commits into
linux-nvme:masterfrom
dwsuse:nvme-ocp

Conversation

@dwsuse

@dwsuse dwsuse commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Add a monitor plugin combining NVMe and OCP spec-compliant operations to simplify fleet monitoring.

Fixes: #2189

$ nvme monitor smart /dev/nvme0 -o json
{
  "device":"nvme0",
  "ocp_supported":false,
  "smart_log":{
    "critical_warning":0,
    "temperature":331,
    "avail_spare":100,
    "spare_thresh":10,
    "percent_used":19,
    "endurance_grp_critical_warning_summary":0,
    "data_units_read":182094536,
    "data_units_written":118624708,
    "host_read_commands":4971578062,
    "host_write_commands":3689075088,
    "controller_busy_time":3261,
    "power_cycles":1226,
    "power_on_hours":6028,
    "unsafe_shutdowns":134,
    "media_errors":0,
    "num_err_log_entries":0,
    "warning_temp_time":0,
    "critical_comp_time":0,
    "temperature_sensor_1":331,
    "temperature_sensor_2":361,
    "thm_temp1_trans_count":43,
    "thm_temp2_trans_count":0,
    "thm_temp1_total_time":766,
    "thm_temp2_total_time":0,
    "op_lifetime_energy_consumed":0,
    "interval_power_measurement":0
  }
}

dwsuse added 2 commits August 18, 2026 11:19
Add a monitor plugin combining NVMe and OCP spec-compliant operations to
simplify fleet monitoring.

Signed-off-by: Daniel Wagner <dwagner@suse.com>
Document the new feature.

Signed-off-by: Daniel Wagner <dwagner@suse.com>
@ikegami-t

Copy link
Copy Markdown
Contributor

Looks good. To make let me confirm below.
Still monitoring feature like as nvme top command not required for this command also as since we can use the watch command instead?

@igaw

igaw commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

FWIW, I was considering moving the code around nvme top to this new monitor plugin and just have a trampoline command.

Anyway, the nvme top does something different to this monitor smart would do. nvme top shows more the
fabric side, while the monitor smart shows you the medium health part.

I don't mind making monitor smart a bit more flexible, e.g. monitor smart --update 2s -o json | some-program-consuming-the-data (or any better name for the argument name).

Is this what you are asking?

@ikegami-t

Copy link
Copy Markdown
Contributor

Understood. Yes thank you for your answering. Just I thought about the command naming monitor as monitoring the smart information but confirmed as just output the smart information as snap shot without the monitoring then asked. Now cleared the situation. Thank you.

@igaw

igaw commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

I am not sure if we actually want to add the monitor plugin after all (see the discussion in #2189)

@ikegami-t

Copy link
Copy Markdown
Contributor

I see. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus exporter for SMART and OCP C0 Log Page

3 participants