This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!