• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Measure Free Memory/CUP using Java  RSS feed

 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to measure Free Memory and Free CUP available on a given time using Java.

I know that there is not cross platform solution for it and I need this for Windows Platform only.

Anybody has C/C++ code or DLL that I can call from Java?

Any other solutions?
 
Ranch Hand
Posts: 290
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried


Ahmad
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found following details in Java API:

Runtime.freeMemory(): Returns the amount of free memory in the Java Virtual Machine.
Runtime.maxMemory(): Returns the maximum amount of memory that the Java virtual machine will attempt to use.
Runtime.totalMemory(): Returns the total amount of memory in the Java virtual machine.

They are JVM sepcific. They are not dealing with the System Memory.
 
Aryan Khan
Ranch Hand
Posts: 290
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe your answer.
http://forum.java.sun.com/thread.jspa?threadID=425258&messageID=1891830
 
author and cow tipper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about using the JVMPI?

JVMPI - The Old Java Virtual Machine Performance Interface

Cheers!

-Cameron McKenzie
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!