Results 1 to 5 of 5
  1. #1
    gopinath511 is offline Member
    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Default API to find CPU Utilization of the current Process

    Hi World,

    Do Java 5 or Java 6 has any new API's for finding the CPU Utilization of the current process. Is there any other way of finding the CPU Utilization of current Process.

    Regards,
    Gopi

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    Not that I know of since the JVM is a virtual environment. You'd have to make some connection to native code which gets this info from the OS.

  3. #3
    vogella is offline Member
    Join Date
    Aug 2009
    Location
    Heidelberg
    Posts
    47
    Rep Power
    0

    Default

    Runtime.getRuntime() allows to get information about the available processors, memory, etc. but I also believe that it is not possible to get the CPU utilization in Java.

  4. #4
    vogella is offline Member
    Join Date
    Aug 2009
    Location
    Heidelberg
    Posts
    47
    Rep Power
    0

  5. #5
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    That looks useful, please make note that vogella's example involves native code, which will make this program platform dependent.

Similar Threads

  1. Process running or not
    By smartsubroto in forum New To Java
    Replies: 4
    Last Post: 11-16-2009, 04:09 AM
  2. Process name
    By logicbug in forum Threads and Synchronization
    Replies: 1
    Last Post: 03-16-2009, 03:11 PM
  3. How to find OS Process List in JAVA ?
    By abstrusevaibhav in forum New To Java
    Replies: 0
    Last Post: 01-29-2009, 11:08 AM
  4. i need help in http process
    By sureshjava in forum New To Java
    Replies: 0
    Last Post: 01-29-2008, 05:56 AM
  5. Current month
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-07-2008, 09:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •