aspose file tools*
The moose likes Java in General and the fly likes Monitoring JVM 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 "Monitoring JVM memory" Watch "Monitoring JVM memory" New topic
Author

Monitoring JVM memory

saidi Bandi
Ranch Hand

Joined: Apr 07, 2007
Posts: 51
hi,

please could you tell me how to monitor the JVM memory useage on UNIX environment.

Thanking you in advance.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

JDK 6 comes with a useful tool, VisualVM. You can start it by running the command jvisualvm, and you can use it to connect to running Java virtual machines and see all kinds of things, like the amount of memory being used, how many threads there are and if they're running or not etc.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
saidi Bandi
Ranch Hand

Joined: Apr 07, 2007
Posts: 51
Hi Young,

Thanks for the reply, but here we are using JDK1.4 version, for that is there any commands to check.


thanking you in advance.
Fred Muhlenberg
Ranch Hand

Joined: Jan 08, 2008
Posts: 39
You can use the JVM command for verbose GC: -verbose:gc
This will output (to standard out) ongoing garbage collection (memory) information with a timestamp so you can get a profile of what memory is being reclaimed and when.

There are some undocumented -XX JVM options available that can help.

See: http://java.sun.com/j2se/1.4.2/reference/whitepapers
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Monitoring JVM memory
 
Similar Threads
Criteria.list() hanging after a few runs
memory allocation
Solving OutOfMemoryException
Out of Memory Exception while exporting to excel using POI for Reports
OutOfMemoryException ??