Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pySMART fails to create Device for nvme drives #75

Closed
NicholasCJL opened this issue Oct 17, 2023 · 0 comments · Fixed by #76
Closed

pySMART fails to create Device for nvme drives #75

NicholasCJL opened this issue Oct 17, 2023 · 0 comments · Fixed by #76
Assignees

Comments

@NicholasCJL
Copy link
Contributor

Describe the bug
pySMART fails to create Device if device is nvme when using the latest version of smartmontools (release 7.4).

Raw outputs
smartctl -d nvme --all <device> works fine to retrieve information about the device, but the new smartmontools release changes the output format of the self-test log causing the regex in pySMART to return an unexpected value.

The following code then behaves unexpectedly as it expects '-' while the greedy regex match returns '- -':

failingLBA = None
if match.group(5) != '-':
failingLBA = int(match.group(5))

Environmental setup:

  • Complete smartctl version [smartctl 7.4 2023-08-01 r5530 [x86_64-w64-mingw32-w11-22H2] (sf-7.4-1)]
  • Py-SMART version [e.g. v1.2.0]

Additional context
The old smartmontools output is given by:

if (++cnt == 1)
      pout("Num  Test_Description  Status                       Power_on_Hours  Failing_LBA  NSID SCT Code\n");

while the new output is:

    if (++cnt == 1)
      jout("Num  Test_Description  Status                       Power_on_Hours  Failing_LBA  NSID Seg SCT Code\n");

There is an additional column Seg in the new output, which the pySMART code does not expect.

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 a pull request may close this issue.

2 participants