Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Active objects in the JVM

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just out of curiosity is there any way to find out the number of object that have references pointing to it in the JVM ? I am not looking for a programmatic solution. Just an API which can be queried to return a number. Does something like this exist ?
 
Srinivas Kalvala
Ranch Hand
Posts: 257
Firefox Browser Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Have look at following classes,

com.sun.management.jmxremote & JCONSOLE uses this,

The JCONSOLE will perform,

Summary
� Uptime: how long the JVM has been running
� Total compile time: the amount of time spent in runtime compilation
� Process CPU time: the total amount of CPU time consumed by the JVM
Memory
� Current heap size: Number of Kbytes currently occupied by the heap
� Committed memory: Total amount of memory allocated for use by the heap
� Maximum heap size: Maximum number of Kbytes occupied by the heap
� Objects pending for finalization: Number of objects pending for finalization
� Garbage collector information: Information on GC, including the garbage collector names,
number of collections performed, and total time spent performing GC
Threads
� Live threads: Current number of live daemon threads plus non-daemon threads
� Peak: Highest number of live threads since JVM started
� Daemon threads: Current number of live daemon threads
� Total started: Total number of threads started since the JVM started (including daemon,
non-daemon, and terminated)
Classes
� Current classes loaded: Number of classes currently loaded into memory
� Total classes loaded: Total number of classes loaded into memory since the JVM started,
including those subsequently unloaded
� Total classes unloaded: Number of classes unloaded from memory since the JVM started
Operating System
� Total physical memory: Amount of random-access memory (RAM) that the machine has.
� Free physical memory: Amount of free RAM the machine has.
� Committed virtual memory: Amount of virtual memory guaranteed to be available to the
running process.



Just have a hands on work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic