*
The moose likes Java in General and the fly likes MemoryMXBean reads the JVM or CPU memory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "MemoryMXBean reads the JVM or CPU memory?" Watch "MemoryMXBean reads the JVM or CPU memory?" New topic
Author

MemoryMXBean reads the JVM or CPU memory?

Sara Brown
Ranch Hand

Joined: Feb 22, 2012
Posts: 55



May i know is this code will read the memory usage for the JVM or the CPU memory? If its not read the CPU memory, is there any codes or plugin or perhaps some software that can capture the CPU memory while running the program? im using eclipse.

(Next question is related to thread but i guess it still can fit with the general scope.)
Supoose the totalMemoryUsed should be higher or lower when using more threads?
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Sara Brown wrote:May i know is this code will read the memory usage for the JVM or the CPU memory?

The MemoryMXBean API clearly states that it manages JVM memory.
The management interface for the memory system of the Java virtual machine.
Sara Brown
Ranch Hand

Joined: Feb 22, 2012
Posts: 55
if that is the case, then how can i measure or get the physical memory means the cpu memory?
varun Dosapati
Ranch Hand

Joined: Nov 18, 2010
Posts: 30

Sara

found a link http://www.coderanch.com/t/376720/java/java/physical-memory which might helps you.

Sara Brown
Ranch Hand

Joined: Feb 22, 2012
Posts: 55
varun Dosapati,

Thank you. I will try it right a way. Thanks for the link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MemoryMXBean reads the JVM or CPU memory?
 
Similar Threads
setting threshold for memory using %
setting threshold for memory using %
Multiprocessor JVM Scalability
RuntimeMXBean
Xmx