krugertech / Krugertech.IO.Smart

A class library for the reading of HDD and SSD SMART registers.
MIT License
41 stars 16 forks source link

Is there any plan to support NVME? #8

Open Polarbear1026 opened 1 year ago

Polarbear1026 commented 1 year ago

Is there any plan or update to support NVME or other types HDD?

krugertech commented 1 year ago

I have no immediate plans to include NVME support. You are welcome to add in support and submit a PR.

There is an answer on SO that may be of use to you, but you would need to verify it is indeed working and port the code over to C#. https://stackoverflow.com/questions/69479818/nvme-s-m-a-r-t-data-retrieval

And here is the Microsoft API for working with NVME drives. https://learn.microsoft.com/en-us/windows/win32/fileio/working-with-nvme-devices

Charltsing commented 1 year ago

https://github.com/hiyohiyo/CrystalDiskInfo

Support for nvme is a tedious work

krugertech commented 4 months ago

Update

So to recap, Microsoft has provided source code here in C++ to read NVME SMART data. This code can be ported to C# and requires unsafe code blocks and making calls to these Win32 APIs.

Here is C# port of the Microsoft NVME SMART code by bor888. (no license specified, need to reach out to the author to inquire) Here is a C# project monitoring solution for NVME drives and uses an MIT compatible BSD3 licensed.

Charltsing commented 4 months ago

https://github.com/MicaApps/DiskInfo https://github.com/hiyohiyo/CrystalDiskInfo

You can refer to these two projects and convert C++to C#