954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Using JNI to find the CPU

Hi;

Does anyone know how 2 use jni??? I want to figure out the CPU temperature. Can somebody teach me how?

Thanx in advanced,
C++

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 

Do you even have any kind of hardware that gets the temperature?

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

no, but in the boot menu u can get all that info, so i thought you dont need extra hardware

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 

Where is this boot menu at? I don't think what your seeing is the temperature, it might be the % usage of some process, but not the temperature.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

hit F8 when your computer is starting up to get the boot menu - boot menu may not be the proper name. Srry 4 being unclear.

Anyway, is there a way to find the % of CPU usage

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 

Yes, you can get the usage, availible RAM, and stuff like that, using this class:

System.Diagnostics.PerformanceCounter

I don't have any examples handy, or I would post some code.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

i tried what u said, but the class doesn't exist

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 

the code u gave me is for .NET

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 
i tried what u said, but the class doesn't exist

I am really sorry, that's a class in C#(syntax looks the same!). My mistake. I do think there is a way of doing this using JNI.

Look at this thread, I think it might help: http://forum.java.sun.com/thread.jspa?threadID=578911&messageID=2915348

I believe you have to do a bunch of other things besides in java to get the CPU usage.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Is this just as like a novelity program beacuse you can download tools to do that.

OurNation
Master Poster
780 posts since Aug 2004
Reputation Points: 16
Solved Threads: 9
 

no, its sorta like task manager

Ghost
Posting Whiz
352 posts since Aug 2004
Reputation Points: 12
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You