This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes How to Get the  CPUs/Processors System Usage in java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to Get the  CPUs/Processors System Usage in java ?" Watch "How to Get the  CPUs/Processors System Usage in java ?" New topic
Author

How to Get the CPUs/Processors System Usage in java ?

Rohit Kumar Gupta
Greenhorn

Joined: Apr 09, 2009
Posts: 3
hi to everyone

am totally new to this community.... so might be posting this on wrong forum..no ideas

as one of my projects i have to calculate the CPU utilization of the computer
in java there is API to calculate CPU utilization in Linux.....but dey dont work in Windows
there is possibility that i dont have proper information...so want to know from you people if there is some way to get such info in Windows....and if there is then i would be really thankful if you people guide me through it.

thanks in advance

Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
There is no API which will help you get this directly in windows. You will have to write that in any other language, and may be invoke it in Java using JNI.
Else, you can go the JMX way.... try getting the info from JConsole.
Rohit Kumar Gupta
Greenhorn

Joined: Apr 09, 2009
Posts: 3
thanks Dawn for the reply and clearing my doubt
i got some program in .Net for getting it, an will use JNI to get the info.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Get the CPUs/Processors System Usage in java ?