Open the GC log switch in WebLogic and print more information

Source: Internet
Author: User

Enter setdomainenv.sh in the appropriate domain directory

Java_options= "Rear add

Sun JDK:

${java_options}-verbosegc-xverboselog:/home/weblogic/bea/gc. ' Date +%y%m%d_%h%m%s '

IBM JDK

${java_options}-verbosegc-xloggc:/home/weblogic/bea/gc. ' Date +%y%m%d_%h%m%s '

Therefore, the GC switch opens

Each time showdown (including downtime), a GC log file is generated after the WebLogic instance to record the GC log of the Java Virtual machine, including details of the specific threads in it


If you want to print the GC details, you can add the following parameters

-xx:+printgcdetails


The GC log prints out the following information for the class:

0.077: [GC 0.077: [defnew:1364k->437k (4928K), 0.0017301 secs]

0.079: [tenured:8704k->949k (10944K), 0.1680245 secs] 9556k->949k (15872K),

[perm:141k->141k (12288K)], 0.1698671 secs] [times:user=0.00 sys=0.00, real=0.17 secs]

0.249: [Full GC (System) 0.249: [Tenured:9141k->9142k (10944K), 0.0032902 secs] 9320k->9142k (15936K),

[perm:141k->141k (12288K)], 0.0033866 secs] [times:user=0.00 sys=0.00, real=0.00 secs]

Heap

def New Generation Total 6912K, used 122K [0x22cb0000, 0x23430000, 0x28200000)

Eden Space 6144K, 2% used [0x22cb0000, 0x22ccebf0, 0x232b0000)

From space 768K, 0% used [0x232b0000, 0x232b0000, 0x23370000)

To space 768K, 0% used [0x23370000, 0x23370000, 0x23430000)

Tenured generation total 15240K, used 9142K [0x28200000, 0x290e2000, 0x32cb0000)

The space 15240K, 59% used [0x28200000, 0x28aed808, 0x28aeda00, 0x290e2000)

Compacting Perm Gen Total 12288K, used 141K [0x32cb0000, 0x338b0000, 0x36cb0000)

The space 12288K, 1% used [0x32cb0000, 0x32cd37a0, 0x32cd3800, 0x338b0000)

Ro space 10240K, 45% used [0x36cb0000, 0x37137290, 0x37137400, 0x376b0000)

RW Space 12288K, 54% used [0x376b0000, 0x37d3ace8, 0x37d3ae00, 0x382b0000)


1.0.077 indicates the time that the GC occurred, starting from the time the JVM was started, in seconds.


2. [Tenured:8704k->949k (10944K), 0.1680245 secs] 9556k->949k (15872K), 8704k->949k (10944K) indicates that the memory area has used capacity before the GC- > GC After the memory area has used capacity (the total capacity of this memory area), 9556k->949k (15872K) indicates that the Java heap has used capacity (total Java heap capacity) after GC before the Java heap has used capacity.


3. GC and full GC only represent the type of pauses for this garbage collection, not the new generation GC or the old GC. If there is full, this GC is Stop-the-world.


4. [Defnew], [tenured], [Perm] indicate the area where the GC occurs, and the area name shown here is closely related to the GC collector used, such as the New generation named [Default] Generation in the collector above, so the [ Defnew]. In the case of the Parnew collector, the Cenozoic name becomes [parnew], meaning [Parallel New Generation]. If the parallel scavenge collector is used, it is called [Psyounggen] by the new generation, and the old and permanent generations are the same, and the name is determined by the collector.


Because the time that is printed in the GC log is after the JVM starts, it is a good idea to record the time created when the GC log file was created, such as ' Date +%y%m%d_%h%m%s ', in order to calculate the specific GC time


Open the GC log switch in WebLogic and print more information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.