开发者

how to know speed of processor fan?

开发者 https://www.devze.com 2022-12-08 06:33 出处:网络
i want to d开发者_开发问答etect processors fan speedis there any Java library to do so.Use sensors. use smbus/i2c/gpio lib.Not sure what platform you\'re interested in, but on Windows you can use WMI,

i want to d开发者_开发问答etect processors fan speed is there any Java library to do so.


Use sensors. use smbus/i2c/gpio lib.


Not sure what platform you're interested in, but on Windows you can use WMI, which provides a class for fan information. The exact location of the fan information in the WMI repository will depend on your motherboard manufacturer (if they provide it at all), so there is no easy way to get the information without coding specifically for different motherboards. You can use this tool to browse the repository and see what's available.


In pure Java - No. So your options are - Write JNI wrappers for all interested platforms. Search for a command line application that provides this for each platform, and use them.

I would normally add "google to see if anyone else has done this". But I'd guess you have already done this and not found anything. I am not surprised - Java is not normally used for low level stuff like this.


You'll have to use JNI or JNA to manipulate the right library on each platform (Windows, Mac, Linux...). For Linux:

Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems.

Homepage: http://www.lm-sensors.org

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号