gopsutil
gopsutil copied to clipboard
Temperature on Windows
Hi,
On Windows (Intel CPU) host.SensorsTemperatures() return []
It returns a common.ErrNotImplementedError too.
Help to implement this on Windows with WMI or (preferably) win32 API very much appreciated 😉
@LeMoussel @Lomanic , i already implement it.
I hope you can check it, and if any problem about it, welcome to tell me, i will fix it.
Thanks.
For future reference, it might be doable to use Open Hardware Monitor (via this SO answer, by loading its DLL) so we don't rely on the slow and unreliable wmi requests implemented in #550. The only drawback is that gopsutil users have to include this DLL next to their binary if we go this path.
But if we use Open Hardware Monitor to implement it, all user or application should include this DLL, does it increase the complexity of application deployment?
Open Hardware Monitor API documentation is poor. For GPU you can see code in https://github.com/openhardwaremonitor/openhardwaremonitor/blob/master/Hardware/ATI/ATIGPU.cs https://github.com/openhardwaremonitor/openhardwaremonitor/blob/master/Hardware/Nvidia/NvidiaGPU.cs
But if we use Open Hardware Monitor to implement it, all user or application should include this DLL, does it increase the complexity of application deployment?
Not necessarily if we use something like github.com/gobuffalo/packr/v2 which would embed the DLL in binaries. To be tested.
It seems like this could complicate the build process especially when cross compiling. Also, I believe users of this library would need to provide the source code for Open Hardware Monitor when distributing their applications.
Not necessarily if we use something like github.com/gobuffalo/packr/v2 which would embed the DLL in binaries. To be tested.
I saw this packr tool, it should use packr build when we want to embed the DLL in binaries. But it maybe hard when cross compiling if use this tools.
As I see it, packr converts an asset to a .go source code file with the asset's contents serialized to a []byte variable. We could commit this (probably huge) file and gopsutil users would be able to easily (cross-)compile without the packr build step. I hope the binary size for Windows users using the host package will not explode (the DLL is just a few kB).