user1912935
user1912935

Reputation: 381

How much memory is being garbage collected?

I would like to know how to print JVM verbose log files to see how much memory is being garbage collected.

Q1: How to add garbage collection parameters to WebLogic server

Q2: How to add manual garbage collections in code level in Java?

Q3: How to find Number of max/min http connections configured in the Weblogic server...

Please answer my set of question. my application is very slow to resolve that I am searching for the answers to these questions.

Upvotes: 1

Views: 858

Answers (2)

Santosh
Santosh

Reputation: 17923

how to print JVM verbiage log files to see how much memory is garbage collecting? -This is answered by @Nikolay Kuznetsov here.I am reproducing the same for the sake of completeness.

-XX:PrintGCDetails 
-Xloggc:<filename>
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintClassHistogramBeforeFullGC 
-XX:+PrintClassHistogramAfterFullGC

how to add garbage collection parameters to web logic server and how to add manual garbage collections in code level in java

For most of the application server, this is generally done in the startup batch files. Generally there is a JAVA_OPTS env varibale which is set with the JVM parameters. An example on windows would be :

set JAVA_OPTS= %JAVA_OPTS% -XX:PrintGCDetails -Xloggc:<filename>

Please check the Weblogic start up batch files and add this at appropriate place.

how to find Number of max/min http connections configured in the weblogic server I would recommend to consult the relevant application server specific documentation. I could find this link. Please check.

Upvotes: 0

Nikolay Kuznetsov
Nikolay Kuznetsov

Reputation: 9579

You can use following options:

-XX:PrintGCDetails 
-Xloggc:<filename>
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintClassHistogramBeforeFullGC 
-XX:+PrintClassHistogramAfterFullGC

Upvotes: 1

Related Questions