Capturing the JVM heap usage information to a log
When using weblogic 6.1sp3 the console under monitoring/performance a graph is
displayed with the historical JVM heap usage information. Is there any way to
capture this information to a log?
For heap size before and after each gc, you could pass the -verbose:gc option to the JVM
on startup:
WLS C:\alex>java -verbose:gc weblogic.Admin PING 10 10
[GC 512K->154K(1984K), 0.0068905 secs]
[GC 666K->164K(1984K), 0.0069037 secs]
[GC 676K->329K(1984K), 0.0029822 secs]
[GC 841K->451K(1984K), 0.0038960 secs]
[GC 963K->500K(1984K), 0.0015452 secs]
[GC 1012K->598K(1984K), 0.0027509 secs]
[GC 1110K->608K(1984K), 0.0029370 secs]
[GC 1120K->754K(1984K), 0.0027361 secs]
[GC 1266K->791K(1984K), 0.0019639 secs]
[GC 1303K->869K(1984K), 0.0028314 secs]
[GC 1381K->859K(1984K), 0.0012957 secs]
[GC 1367K->867K(1984K), 0.0012504 secs]
[GC 1379K->879K(1984K), 0.0018592 secs]
[GC 1391K->941K(1984K), 0.0036871 secs]
[GC 1453K->988K(1984K), 0.0027143 secs]
Sending 10 pings of 10 bytes.
RTT = ~47 milliseconds, or ~4 milliseconds/packet
Looks like it might be too much info though...
Cheerio,
-alex
Fazle Khan wrote:
When using weblogic 6.1sp3 the console under monitoring/performance a graph is
displayed with the historical JVM heap usage information. Is there any way to
capture this information to a log?
Similar Messages
-
Can you alter the JVM heap space size for all Windows users?
Hi,
I have used the "-Xmx" option to increase the Java Heap space for my Java application. This works fine, but all other users on my system still have the default heap space setting and I want them to have use an increased heap space as well. I cannot alter the JVM heap space at the command line since our Java application is started via an ActiveX bridge from a Windows application.
So far I have found one potential, but not really good solution; I have figured out that I can copy the deployment.properties file containing the altered JVM heap setting from the "Application Data\Sun\Java\Deployment" folder in my own Windows "Documents and Settings" folder to the same folder of another user. However, this is not a really good solution since we are running a system with about 60 users and often new user accounts are created and sometimes people forget to copy the deployment.properties file.
Does anyone know a better solution. I've tried to search the Windows registry or the JRE files for a default JVM heap space setting but I can't find it anywhere. Still on some systems the default is 64Mb and on others 96Mb, so I guess there must be a setting somewhere?The following is my eclipse.ini:
-vmargs
-Xms256m
-Xmx512m
-Dfuego.fstudio=true
-DprodMode=preProduction
-Dbea.home=C:\bea\albpm6.0\studio\..
-Djava.endorsed.dirs=""
-XX:PermSize=256M
-XX:MaxNewSize=256M
-XX:MaxPermSize=1024M
but i think this configuration just effect the eclipse, not embed bpm engine. I also change the engine preference, increase the heap size, but engine crash as before.
I want to change the jvm from jdk to jrockit, i hope any suggest. -
How do I increase the JVM heap size
How do I increase the Java heap space
i've used java -Xms32m -Xmx256m
but it just keeps outputing the usage: java [-opetions] class [args...]
-client
-server
-hotspot
-cp
-classpathhtats wrote:
How do I increase the Java heap space
i've used java -Xms32m -Xmx256m
but it just keeps outputing the usage: java [-options] class [args...]Did you give it a class to run? -
Question on the JRockit Heap diagnostics information
Using the JRCMD, collected the JRockit Heap diagnostics data. Below is the output:
--------- Detailed Heap Statistics: ---------
69.5% 1240837k 316026 +1240837k [B
8.5% 133278k 1562216 +133278k [C
What does [B and [C stand for?
what process is occupying this much of memory? What is B and C?That's a good question.
It's a user unfriendly way to say to byte and character arrays ;) It should be changed.
From the VM spec:
B byte
C char
D double
F float
I int
J long
L<classname>; reference an instance of class <classname>
S short
Z boolean
[ one dimension array -
Using a bean to capture the currently authenticated user information
Hi,
i have an ADF web based application . The authentication and authorization is managed by OID(LDAP) . I want to put user level access in the application. I have made a custom method in the application module, that handles the authorization at user level. But i do not know how to capture the info of currently logged in user. I'am aware i can do this using a bean. Can someone tell me howIt'd be better to post this to the JDeveloper forum where ADF is covered.
cheers
-steve- -
Can I get the reference to all objects in JVM Heap?
Hello,
Thanx in advance for reading (and replying) to this problem.
I need to find an object whose reference I dont have.
I feel the best place to search for is the JVM heap.
If I get that JVM heap, and am able to get all the objects created, I can locate the particular object that I am looking for.
Is there a way to od this????
Any suggestions ????
VikasJVMTI will mostly help you in this case. But i recomend you to review you application design, because such services are unsafe and rather tricky.
-
How to get memory usage of the JVM...
Hi,
I want to know the total amoutn of memory used by the JVM, while I am doing some particular transaction over my web application.
One way is to use the methods in java.lang.Runtime. But the output seems to be fluctuating to a significant extent.
Is there an alternative way to accomplish the same.
TIA,
Basu.Complie with the setting -verbose:gc,
whenever the GC runs, it prints out the acutal amount of mem originally used, the amount used after GC and the JVM mem usage. -
Memory leak in the JVM leading to system oom
Hi,
We are running application server using java 1.5, tomcat 5.5 ...
The problem is that the JVM is allocating memory continuously.
If we look at the JVM memory from JConsole everything is OK the amount of memory allocated in the heap does not grow significantly.
If we look at the JVM memory consumption from the system perspective, the memory usage is growing until the system runs out of memory and kill the JVM. The JVM memory usage goes beyong 1.5 Go of memory whatever options you use when launching the JVM.
The memory allocation is so intense that it can lead to a crash in few hours with very few users connected to the application.
We have tried JDK 1.5.05 and 1.5.06 still the same.
We are running on a Linux Debian system wth a 2.6.8 kernel.
Any idea of where all this memory goes ?
Any idea on how to track and solve this memory leak ?Hi Martinux,
Tiger and Mustang come with a number of diagnosing tools that could help
you spot memory problems. In particular there's something called 'jmap' which can
take a snapshot of the JVM memory.
Danny Coward has recently written a nice blog to emphasize the existence
of this new tools - see
"Crash Course: Java SE Monitoring, Management and Troubleshooting"
http://blogs.sun.com/roller/page/dannycoward?entry=crash_course_java_se_monitoring
Of course if the problem isn't in the JVM...
BTW: you did also look at the non-heap memory, right? and also at the total
number of loaded classes?
hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/roller/page/jmxetc -
I am unbale to find the JVM heap settings.Could you please me where the heap size was defined?
886340 wrote:
With reference to Java WebStart.
sigh
- I open google
- I type in "java webstart set heap". Click search
- first hit: the webstart faq
http://download.oracle.com/javase/1,5.0/docs/guide/javaws/developersguide/faq.html
- I search for "heap" using the browser search function
- I feel superior for finding the answer that quickly and easily
It makes me sad when people don't want to help themselves to live an easier and more rewarding development life. All it takes is the will to learn how to find information yourself :( -
Hi all,
Our Environment
===============
OS - Windows XP Service Pack 3
Oracle Developer Suite - 10.1.2.3.0
Oracle Forms & Reports Service 10.1.2.3.0
Oracle Database 10.2.0.1.0
JDK 1.5
Jinitiator 1.3.1.30
Apache POI 3.5
From forms we are writing to excel files after copying XL template using Apache POI 3.5 and JDK 1.5. This XL template file has got lot of macros.
We have imported the Java class files into form as pl/sql library. We are able to write upto 7Mb size of XL file. Beyond that size it comes with the error Ora-105101.
We tried to increase the JVM Heap Size to 640M by setting values -Xmx640M everywhere in OC4J_BI_FORMS/Server Properties/Java Options, Home/Server Properties/Java Options through Enterprise Manager console. Also manually set the values in OPMN.XML and reloaded the same. Also set -Xmx640M in Jinitiator 1.3.1.30 Java Runtime Parameters. Also set in Java console. All settings have no effect.
We have written a small program to display the run time memory from forms, which displays only maximum memory 63M all the time.
PACKAGE BODY HeapSize IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('HeapSize', '()V', args));
END;
-- Method: getTotalMemory ()D
FUNCTION getTotalMemory(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getTotalMemory', '()D', args);
END;
-- Method: getMaxMemory ()D
FUNCTION getMaxMemory(
obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
BEGIN
args := NULL;
RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getMaxMemory', '()D', args);
END;
BEGIN
NULL;
END;
declare
obj ORA_JAVA.JOBJECT;
BEGIN
obj:=HeapSize.new;
message('Total memory '||HeapSize.getTotalMemory(obj));
message('Max memory '||HeapSize.getMaxMemory(obj));
END;
Below procedure is for writing to Excel file.
============================================
PACKAGE BODY UWWriteExcel IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('UWWriteExcel', '()V', args));
END;
-- Method: copyExcel (Ljava/lang/String;Ljava/lang/String;)V
PROCEDURE copyExcel(
obj ORA_JAVA.JOBJECT,
a0 VARCHAR2,
a1 VARCHAR2) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_STRING_ARG(args, a0);
JNI.ADD_STRING_ARG(args, a1);
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'copyExcel', '(Ljava/lang/String;Ljava/lang/String;)V', args);
END;
-- Method: getSpreadSheetPara (Ljava/lang/String;)V
PROCEDURE getSpreadSheetPara(
obj ORA_JAVA.JOBJECT,
a0 VARCHAR2) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_STRING_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getSpreadSheetPara', '(Ljava/lang/String;)V', args);
END;
-- Method: openSheet (I)V
PROCEDURE openSheet(
obj ORA_JAVA.JOBJECT,
a0 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_INT_ARG(args, a0);
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'openSheet', '(I)V', args);
END;
-- Method: getCellValues (IID)V
PROCEDURE getCellValues(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER,
a2 NUMBER) IS
BEGIN
args := JNI.CREATE_ARG_LIST(3);
JNI.ADD_INT_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.ADD_DOUBLE_ARG(args, a2);
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IID)V', args);
END;
-- Method: getCellValues (IILjava/lang/String;)V
PROCEDURE getCellValues(
obj ORA_JAVA.JOBJECT,
a0 NUMBER,
a1 NUMBER,
a2 VARCHAR2) IS
BEGIN
args := JNI.CREATE_ARG_LIST(3);
JNI.ADD_INT_ARG(args, a0);
JNI.ADD_INT_ARG(args, a1);
JNI.ADD_STRING_ARG(args, a2);
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IILjava/lang/String;)V', args);
END;
-- Method: exportExcel ()V
PROCEDURE exportExcel(
obj ORA_JAVA.JOBJECT) IS
BEGIN
args := NULL;
JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'exportExcel', '()V', args);
END;
-- Method: copy (Ljava/lang/String;Ljava/lang/String;)V
PROCEDURE copy(
a0 VARCHAR2,
a1 VARCHAR2) IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_STRING_ARG(args, a0);
JNI.ADD_STRING_ARG(args, a1);
JNI.CALL_VOID_METHOD(TRUE, NULL, 'UWWriteExcel', 'copy', '(Ljava/lang/String;Ljava/lang/String;)V', args);
END;
BEGIN
NULL;
END;
declare
obj ORA_JAVA.JOBJECT;
BEGIN
message('-1');pause;
obj:=UWWriteExcel.new;
message('0');pause;
UWWriteExcel.copyExcel(obj,'C:\\excel\\CAT2009WS.XLS','C:\\excel\\CAT2009WS.XLS');
message('1');pause;
UWWriteExcel.openSheet(obj,0);
message('2');pause;
UWWriteExcel.getCellValues(obj,6,2,900);
message('3');pause;
UWWriteExcel.getCellValues(obj,7,2,911);
message('4');pause;
UWWriteExcel.exportExcel(obj);
END;
When the size of XL is more than 7Mb, after message(0) it will be display oracle error.
From command prompt if we run the same java class file by passing -Xmx256m parameter we are able to write to big XL file.
Can anyone tell me where I am wrong... Can we increase the JVM Heap Size from forms...I have a simular problem.
Via Forms I call a Java class (import Java class -> PL/SQL class java method).
For this specific process I need to set the Xmx java option...
How do I do this ?
Changing the java option for the Forms-OC4J in the EM doesn't help.
Is there an other level where I can modify this ?
Does the java process of the forms is the single process that exists ? How does he handles such java calls?
Are that separed java processes ? threads ? ....
Thanks !!! -
How to get jvm heap size?
Hi All,
I would like to get the jvm heap size.
by which method to get jvm heap size?
Where it can be executed?
Thanks,You can get this:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#freeMemory() -
Can you please let me know how to increase the JVM Heap Size -- on linux fedora 6.0.
Thank you,See -Xmx
http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html -
Hi, just a short question. If I call a native method from Java which read a large file into memory, it consume the JVM heap or its own memory?
Thanks.Can't say for sure where the problem is (though DO hope that it's some error in the code - otherwise i'd be in trouble - starting to write a code based on storing large data structures in native part), but two suggestions:
1) error is 'file i/o' specific, meaning that probably you are running out of some IO resources (which means that DLL is probably written incorrectly or some specific memory area of JVM is to be increases - see HotSpot tuning). I recall that you are getting the error during memory allocation error, but still...
2) .... probably smth else :) (just forgot what was the second one...)
Try this workaround: start up JVM from native code and read the file into JVM from that layer
eg, event based model:
// native code
main() {
*p = CreateJVM();
while (true) {
if (p->doReadFile()) {
file* f = readFile();
p->setFileBytes(f->toByteArray());
sleep();
// java code
void readFile() {
setDoReadFile(true);
while (!isDataReady()) wait(1000);
byte[] arr = getFileBytes();
}This way you'd be sending data TO JVM, not reading it FROM JVM. I guess there might be other way to implement this kind of solution (still JVM driven, but with reading data not into memory allocated from JVM, but into the process the JVM itself was started from - by passing a pointer to this main process into Java and then into native method or smth like that, but don't know for sure how to do this).
I'll run appox. the same test (without reading data from the file but generating it from Java code) under Linux and let you know the results. -
We have a memory leak occurring on our appserver (glassfish) and are having trouble pinpointing its cause, so I want to turn on some of the JVM heap dump options. I have turned on the following two:
-XX:-HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/heap_dump.hprofAre there any other options I can use to help resolve this? Also what will the dump output contain? Plain-text?
Thanksa profiler comes to mind. But how do you know it is an actual memory leak? Are you getting out of memory exceptions?
-
Hi,
I don't know where to set the JVM heap...can anybody give me step by step to set the JVM heap..What do you mean by set the heap? Set its size?Yes, what I mean is heap size. I got the problem java.lang.outOfmemory, and try ind the solution. Some of solution said set the heap size but it didn't explain in more detail.
Look at the arguments to java. (I mean "java" as in
"java.exe", the JVM executable.)What u mean look at the arguments to java?
Maybe you are looking for
-
HEY MY PHONE IS LOCKED AND MY STEPSON STEP UP A ICLOUD ACCOUNT AN KNOW HE DOES NOT KNOW THE ICLOUD USERNAME OR PASSWORD. WHEN I TURN THE PHONE ON IT WILL SAY HELLO AN ASK FOR THE STATE AN THE ASK FOR THE INTERNET PASSWORD. THEN IT ASK FOR THE ICLOUD
-
Good Day. I have been using pages to write marketing and technical review docs. I have now forgotten how to use word! I am writing a white paper and need to create a TOC but I cant see those checkboxes that everyone is raving about to the left each p
-
Why is the audio suddenly silent on my macbook pro?
I have a MacBook Pro using Mountain Lion and I am away from home, using wifi in a hotel. I just discovered that the audio is suddeny silent when I go to YouTube or any other video or music site. Any idea what's going on and how to fix it. I have turn
-
Item Prices in the oInventroyGenEntry DTW
Hello, I am trying to make an Entry with the DTW, In the DocumentLines template there is a field named "Price" , but this price is ignored when i import the document. Is it possible to set the prices via DTW? Thanks Jacobo
-
Having downloaded osx10.8 i now cant open Pages. Is there a fix for this?
having recently downloaded osx10.8 I now can't open Pages. Is there a fix for this?