> On Jan 4, 12:15 pm, wong_po...@yahoo.ca wrote:
>> How to get the current heap size of java on linux?
[quoted text clipped - 3 lines]
> Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
> Java HotSpot(TM) Server VM (build 1.6.0_02-b05, mixed mode)
By using the java.lang.management API
http://java.sun.com/javase/6/docs/api/java/lang/management/package-
summary.html
By using an external JMX utility, ex. jconsole
http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html
Good Luck.

Signature
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
wong_powah@yahoo.ca - 04 Jan 2008 18:49 GMT
> > On Jan 4, 12:15 pm, wong_po...@yahoo.ca wrote:
> >> How to get the current heap size of java on linux?
[quoted text clipped - 15 lines]
> *http://www.rgagnon.com/howto.html
> *http://www.rgagnon.com/bigindex.html
I am looking for a command line tool.
Is this the best way?
ps -ef|grep java
jmap -heap <pid>
Real Gagnon - 04 Jan 2008 19:03 GMT
>> By using the java.lang.management
>> APIhttp://java.sun.com/javase/6/docs/api/java/lang/management/package-
[quoted text clipped - 8 lines]
> ps -ef|grep java
> jmap -heap <pid>
Yep, jmap is the command line utility provided by the JDK1.6 for memory
related statistics.
http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/gbdid.html
Bye.

Signature
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html