Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shell script for JVM heap size monitoring

 
P B Madhavan
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

We have a websphere portal application (v6.1) and it is running on AIX.

I require a simple shell script to probe the JVM heap size and echo an error message if the heap size utilization exeeds a threshold.

Thanks in advance, hope someone can help me here, I am not an expert in Unix shell scripting.

regards,

P B Madhavan
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P B, welcome to Java Ranch!

Are you talking about overall heap size, or about heap usage? Either way, I don't think that such a script will do for you what you think it will. In the former case, heaps tend to increase in size as the app is used, especially with apps such as Java EE application servers. For the latter, once the heap usage reaches a certain amount, a major garbage collection will come along and free a bunch of space. You can observe both of these by hooking up either jconsole or jvisualvm to your Java app.

By the way, what is it that you are really looking for?
 
Andrei Matyas
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I do not know if jmap command is available on an AIX system. If not may be this link will be usefull: http://www.redbooks.ibm.com/redbooks/pdfs/sg247353.pdf
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic