2

I wrote a small hack that uses Java JNA and TCP sockets to transmit battery information from a Windows 7 system to other systems on my network, and I'd now like to add thermal monitoring functionality to it. Is it possible to monitor system thermal statistics from JNA?

Edit: Forgot to mention that I need a "pure Java" solution (but JNA and friends are permitted); I'm in a horrible environment that ensures I can't run applications that aren't digitally signed, I don't have access to the digital signature list, and I can't disable the digital signature lockdowns.

Jashank Jeremy
  • 360
  • 1
  • 4
  • 14
  • possible duplicate http://stackoverflow.com/questions/117043/what-is-the-best-way-for-a-java-program-to-monitor-system-health – Rajeev Sreedharan Sep 04 '11 at 06:19
  • This question has far narrower scope, and much tighter restrictions; for instance, I don't have the option to use SNMP. I need a "pure Java" solution for the reasons that I've mentioned in a comment to the answer @Snicolas submitted. – Jashank Jeremy Sep 04 '11 at 08:53

2 Answers2

3

Most stuff I've read shows that manufacturers use WMI to expose this information. To allow your Java program to access WMA, check out this thread: Recommended libraries/howtos for using WMI with java?

Community
  • 1
  • 1
Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373
  • That might, under other circumstances, work. On this circumsized system, it seems I don't have the necessary WMI providers for thermal sensing. That's a good solution for other things, though, and I'm going to persue it. – Jashank Jeremy Sep 04 '11 at 09:06
0

If you could find a command line utility that works on windows to get sys temp you could call it from a processbuilder in Java.

Stephane

Snicolas
  • 37,840
  • 15
  • 114
  • 173
  • One of the things that disqualifies this is that I need a "pure Java" solution; I'm in a horrible environment that ensures I can't run applications that aren't digitally signed, I don't have access to the digital signature list, and I can't fix it. Sorry. – Jashank Jeremy Sep 04 '11 at 08:51
  • So if you don t have wmi and must found java solution, you can t. – Snicolas Sep 04 '11 at 14:56