Solved

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

Posted on 2011-02-24
5
605 Views
Last Modified: 2013-12-21
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.
0
Comment
Question by:raj17
5 Comments
 
LVL 9

Expert Comment

by:amolg
ID: 34979723
which unix OS? for solaris use "prstat -a".
0
 

Author Comment

by:raj17
ID: 35004093
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
 
LVL 9

Accepted Solution

by:
fcontrepois earned 250 total points
ID: 35088083
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
 
LVL 53

Expert Comment

by:Dhaest
ID: 35321640
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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now