We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Query CPU Load or memory
Page Index Toggle Pages: 1
Query CPU Load or memory (Read 251 times)
Query CPU Load or memory
Aug 29th, 2008, 2:36am
 
Can processing Query the cpu load of the system? or the memory being used?
If it does, How would I go about doing that? Thanks.
Re: Query CPU Load or memory
Reply #1 - Aug 29th, 2008, 7:38am
 
As expected, Java can't do that (CPU load) natively: it is highly depending on the underlying system.
Now, with some appropriate keywords in my search Smiley I found this page: http://www.javaworld.com/javaworld/javaqa/2002-11/01-qa-1108-cpu.html
I also found a French article (but with usable code) telling that Sun started to implement this in Java 6: http://www.touilleur-express.fr/2008/05/23/comment-trouver-la-charge-cpu-de-la-machine-en-java/
Apparently, it doesn't work in Windows (in May 2008 at least).

You can find more info on memory usage, the second article points to MXBean.
Page Index Toggle Pages: 1