Win a copy of AWS Security this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Monitoring JVM memory

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

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

Thanking you in advance.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
saidi Bandi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic