@aremiaskfa Hello again, and thanks for chasing this one down.
Re:
Yes, that looks to be correct; at least as far as you have tracked this down before the smart.available() discovery anyway.
It very much looks like you are getting to the root of this one actually.
Re:
The only developer docs we have for these related functions are within their docstrings. I think the following source file and location should point you in the right direction:
Which is under (a part/file of) the system module (note the init.py within the system dir).
From the file you have been looking at we have the following import from elsewhere in our own code:
And so we get access to “smart” and all it’s goodies as we have defined them: smart.available is thus usable within this views/disk.py file.
And if you do fancy taking your findings to a pull request stage, then note that we don’t as-yet have any unit tests for this part (smart) of the system module:
It may very well be a good time/exercise to add some coverage to this area if it turns out that what we need here is an augmentation in our parsing to decern smart availability. But it may also be that nvme output is quite different. Let us know how your experimentation goes.
Also note that we have an ability to submit problematic smart output via the following shell script:
So it would be helpful to post the output of that script, for the given NVME device to our support email as we would then have access to this particular smart output. The testing mode you see referenced in smart.py is intended for developers to be able to test our code on systems they don’t have direct access to. I unfortunately don’t have access to a real nvme currently, but we do have some in the ‘team’ : but as always it’s a matter of prioritising time. So do, if you can, keep chipping away on this one as I think you are running down a new area of development for us. As stated we have never supported nvme smart and their output may present some new challenges.
Hope that helps, and thanks again for potentially extending our nvme smart capabilities.