Monitor the temperature sensors, fan speeds, voltages, load and clock speeds of your computer.
$ dotnet add package OpenHardwareMonitorLibOpen hardware monitor - is free software that can monitor the temperature sensors, fan speeds, voltages, load and clock speeds of your computer.
This application is based on the "original" openhardwaremonitor project.
You can see information about devices such as:
Remote web-server mode for browsing data from remote machine with custom port and authentication.Hide/Unhide sensors to remove some data from UI and web server.Tray icons and Gadget for selected sensor values.Light/Dark themes with auto switching mode.color-themes from external files - You can find examples herePortable mode for storing temporary driver file and settings configuration next to the executable file.Updated versions check - manually from main menu.Note: Some sensors are only available when running the application as administrator.
Light/Dark themesThe published version can be obtained from releases.
Integrate the library in own application
Sample code
class HardwareInfoProvider : IVisitor, IDisposable {
private readonly Computer computer;
public HardwareInfoProvider() {
computer = new Computer {
IsCpuEnabled = true,
IsMemoryEnabled = true,
};
computer.Open(false);
}
internal float Cpu { get; private set; }
internal float Memory { get; private set; }
public void VisitComputer(IComputer computer) => computer.Traverse(this);
public void VisitHardware(IHardware hardware) => hardware.Update();
public void VisitSensor(ISensor sensor) { }
public void VisitParameter(IParameter parameter) { }
public void Dispose() => computer.Close();
internal void Refresh() {
computer.Accept(this);
var cpuTotal = computer.Hardware.FirstOrDefault(h => h.HardwareType == HardwareType.Cpu)?.Sensors.FirstOrDefault(s => s.SensorType == SensorType.Load && s.Name == "CPU Total");
Cpu = cpuTotal?.Value ?? -1;
var memorySensorName = "Physical Memory Available"; //"Virtual Memory Available";
var memUsed = computer.Hardware.FirstOrDefault(h => h.HardwareType == HardwareType.Memory)?.Sensors.FirstOrDefault(s => s.SensorType == SensorType.Data && s.Name == memorySensorName);
Memory = (memUsed == null || !memUsed.Value.HasValue) ? -1 : memUsed.Value.Value * 1024; //GB -> MB
}
}Administrator rights
Some sensors require administrator privileges to access the data. Restart your IDE with admin privileges, or add an app.manifest file to your project with requestedExecutionLevel on requireAdministrator.
The OpenHardwareMonitor team welcomes feedback and contributions!
You can check if it works properly on your motherboard. For many manufacturers, the way of reading data differs a bit, so if you notice any inaccuracies, please send us a pull request. If you have any suggestions or improvements, don't hesitate to create an issue.
OpenHardwareMonitor is free and open source software licensed under MPL 2.0. You can use it for personal and commercial purposes.