Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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: 5000
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
 
Normally trees don't drive trucks. Does this tiny ad have a license?
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!