How do i find the memory used by jvm loaded using c++ process

I have loaded the jvm from c++ and starting the java using JNI.
I want to check what is the memory usage of the jvm after the process is started.
please specify a tool with example(Unix) which i can use.
raj17Asked:
Who is Participating?
 
Frank ContrepoisVP Technical SalesCommented:
Short answer: JVMSTAT http://www.oracle.com/technetwork/java/faq-141822.html

Long one:
 JVM manages it's own memory, so you set it or you're using defaults and those are differents for every JVM (sun, ibm, jrockit, terracotta ...) and others elements.

Command lines parameters for JVM that affect memory
http://download.oracle.com/javase/1.5.0/docs/tooldocs/solaris/java.html#Xms you'll use Xmx + some MB for the permgen memory.

Using JVMSTAT should be more precise but more complicated to setup
0
 
AmolCommented:
which unix OS? for solaris use "prstat -a".
0
 
raj17Author Commented:
Am not running any jar file using java command, there is no separate process id  to find the statistics about. jvm has been initialized from C++
0
 
DhaestCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.