matteofabbri / hardwareproviders Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
env : .net core console+ netstandard2.0
This is my code:
var hardDrives = HardDrive.Discover();
foreach (var hardDrive in hardDrives)
{
foreach (var item in hardDrive.SmartSensors)
{
Console.WriteLine("{0},{1}", item.Key, item.Value);
}
}
when try to get some SmartSensors in hardDrive, i found ,there is nothing.
Whenever I track the values of CoreLoads and CpuLoad, the only values it reports regardless of actual usage are 0, 50, or 100.
Hello, I am trying to use your project to get cpu/board temps from my systems that contains a msi x470 gaming plus motherboard and a ryzen 2700x.
Source code
class Program
{
static void Main(string[] args)
{
//var motherboard = new Mainboard();
var cpu = Cpu.Discover();
var cpua = cpu.First();
Console.WriteLine(cpua.Name);
Console.WriteLine(cpua.PackageTemperature.Value);
//Console.WriteLine(cpua.PackageTemperature.Name + cpua.PackageTemperature.Value + "degreess");
foreach (var coreTemperature in cpu.First().CoreTemperatures)
{
Console.WriteLine(coreTemperature.Name + " : " + coreTemperature.Value + " degreess");
}
}
}
and the output is as follows
AMD Ryzen 7 2700X
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at RgbSharp.Logitech.Led.Test.Program.Main(String[] args) in D:\Programming\csharp\RGB.Sharp\src\logitech\led\RgbSharp.Logitech.Led.Test\Program.cs:line 19
Process finished with exit code -1,073,741,819.
Trying to get your sample to run on MacOS, using a your example, but keep getting the following exception:
RROR: System.TypeInitializationException: The type initializer for 'HardwareProviders.Hardware' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, StackCrawlMark& stackMark, IntPtr pPrivHostBinder)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at HardwareProviders.Opcode.Open()
at HardwareProviders.Hardware.EnsureHook()
at HardwareProviders.Hardware..cctor()
--- End of inner exception stack trace ---
at HardwareProviders.Hardware..ctor(String name)
at HardwareProviders.Board.Mainboard..ctor()
at ConsoleApp.Program.Main(String[] args) in
Basic code as follows:
var cpus = Cpu.Discover();
value = cpus.First().PackageTemperature.Value;
throws:
System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values.'
at HardwareProviders.CPU.CpuId..ctor(Int32 thread)
I am using a i7-9700k which has no HT, so perhaps 0 for thread is throwing the error.
willing to contribute if you point me towards useful resources about how to get that information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.