Skip to content

pmdasmart: Add nvme_error_log.total metric#2558

Merged
natoscott merged 1 commit intoperformancecopilot:mainfrom
pauljevans:pevans-merge
Apr 13, 2026
Merged

pmdasmart: Add nvme_error_log.total metric#2558
natoscott merged 1 commit intoperformancecopilot:mainfrom
pauljevans:pevans-merge

Conversation

@pauljevans
Copy link
Copy Markdown
Collaborator

Add smart.nvme_error_log.total metric that reports the total number of NVMe error log entries per disk, returning zero when no errors exist. Available for both device name and WWID instances.

Comment thread src/pmdas/smart/smart_stats.c Outdated
if (found_nvme_log && strstr(buffer, "No Errors Logged"))
if (found_nvme_log && strstr(buffer, "No Errors Logged")) {
// No error entries head to next drive
dev->nvme_error_log_total = 0;
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.

The logic here is a bit questionable - when we break here, this zeroing of nvme_error_log_total may be overwritten unintentionally with 'count' outside the loop, no?

Copy link
Copy Markdown
Collaborator Author

@pauljevans pauljevans Apr 13, 2026

Choose a reason for hiding this comment

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

Indeed, the statement is redundant also as the value is initialised on line 1436. I will update the commit to fix this. Thanks

Add smart.nvme_error_log.total metric that reports the total number
of NVMe error log entries per disk, returning zero when no errors
exist. Available for both device name and WWID instances.
@natoscott natoscott merged commit 87e917f into performancecopilot:main Apr 13, 2026
22 of 23 checks passed
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.

2 participants