昨天自己找的答案: 1. Wrong forum. 2. You can't. You'll have to invoke a native program that writes this info out, and read its output from your java program. 3. yep, wrong forum as already explained. 4. if your targeted OS has an extensive monitoring that is accessible thru SNMP, then it can be done IMHO, go to an instrumentation forum (or maybe JMX related)Java没有办法可以直接访问硬件,使用JNI,或者访问一些特殊的文件,比如Linux的/proc filesystem都是解决方法。
1. Wrong forum.
2. You can't. You'll have to invoke a native program that writes this info out, and read its output from your java program.
3. yep, wrong forum as already explained.
4. if your targeted OS has an extensive monitoring that is accessible thru SNMP, then it can be done IMHO, go to an instrumentation forum (or maybe JMX related)Java没有办法可以直接访问硬件,使用JNI,或者访问一些特殊的文件,比如Linux的/proc filesystem都是解决方法。