File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes How to read GC output log ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "How to read GC output log ?" Watch "How to read GC output log ?" New topic

How to read GC output log ?

Francesco Marchioni
Ranch Hand

Joined: Sep 22, 2003
Posts: 194
Hi all,
I'm in mess with GC JDK 1.4.x log output. I'd like to read -besides GC information-
how much memory I have left and how much I'm using.

This is a small dump from the GC log:

976.578: [GC 976.578: [Tenured: 18115K->7153K(18116K), 0.3309426 secs] 19523K->7153K(19524K), 0.3459331 secs]
980.544: [GC 980.544: [Tenured: 18115K->8080K(18116K), 0.1734528 secs] 19523K->8080K(19524K), 0.1949907 secs]
982.783: [GC 982.783: [Tenured: 18115K->12388K(18116K), 0.1951404 secs] 19523K->12388K(19524K), 0.2119867 secs]
986.579: [GC 986.579: [Tenured: 20647K->8289K(20648K), 0.1755991 secs] 22311K->8289K(22312K), 0.1924510 secs]

From what I understand I have 8289K free memory and 22312K allocated.

At the meantime my application dumps Runtime.freeMemory() and.Runtime().totalMemory();

and numbers are quite different for free memory:

Free memory: 3'787'672
Total memory: 19'992'576

Free memory: 1'800'240
Total memory: 19'992'576

Free memory: 4'216'928
Total memory: 22'847'488

Free memory: 4'024'792
Total memory: 22'847'488

Does anybody know how to read free/total memory from GC's output ??

Enterprise Integration Tutorials - JBoss-WildFly Tutorials
I agree. Here's the link:
subject: How to read GC output log ?
It's not a secret anymore!