I'm developing a .NET 5 console application and would like to be able to read some basic system info such as CPU temperature, memory usage, CPU usage, etc. My development machine is running windows but the application is deployed to a Linux machine, therefore I'd like to avoid having to write two different sets of code for both OS.
How do I do this in a cross platform way? There are plenty of Windows API and calls that will do this, but I need Linux to work as well.