Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rohit Kumar Gupta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic