Reading CPU and Memory of a process
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, February 11, 2002 04:58 AM

I wanted to read the Memory and CPU consumption of a process in Windows 2000 machine. Will this be possible through java!! Is there any Java api's to do this.

Re: Reading CPU and Memory of a process

Posted By:   bharani_iyer  
Posted On:   Monday, February 11, 2002 05:52 AM

Hi,

The "Runtime" class in java.lang provides certain methods that could tell you the amount of free mekory available, total amount of memory in the Java Virtual Machine.


To check out CPU usage use the taskmanager.


Cheers,

bharani

P.S: Runtime is a singleton, so you have to obtain a reference of it by invoking Runtime.getRuntime().
About | Sitemap | Contact