Date/TimeStamp in Native Logs for GC

Hello Experts,

I have an issue going on where I want to line up an error in the SystemOut.log to the GC output. Actually I am having issues of CPU Starvation.
So I want to  line-up CPU Starvation with GC cycles. To do that, I want to know the exact time when cpu starvation happen in systemout.log and the native_stdout.log.

The argument is already passed "-XX:+PrintGCDetails -XX:+PrintGCTimeStamps" under generic jvm

how can I line-up both the output to get the desired results.
OS - SOLARIS 9

{Heap before gc invocations=20576:
 PSYoungGen      total 173824K, used 173785K [0xe8000000, 0xf3c00000, 0xf8000000)
  eden space 169472K, 100% used [0xe8000000,0xf2580000,0xf2580000)
  from space 4352K, 99% used [0xf2a40000,0xf2e76658,0xf2e80000)
  to   space 10816K, 0% used [0xf3170000,0xf3170000,0xf3c00000)
 PSOldGen        total 1310720K, used 998583K [0x98000000, 0xe8000000, 0xe8000000)
  object space 1310720K, 76% used [0x98000000,0xd4f2dd60,0xe8000000)
 PSPermGen       total 172032K, used 169515K [0x88000000, 0x92800000, 0x98000000)
  object space 172032K, 98% used [0x88000000,0x9258ae28,0x92800000)
504427.177: [GC [PSYoungGen: 173785K->10670K(178432K)] 1172368K->1011439K(1489152K), 0.0820464 secs]
Heap after gc invocations=20576:
 PSYoungGen      total 178432K, used 10670K [0xe8000000, 0xf3c00000, 0xf8000000)
  eden space 167616K, 0% used [0xe8000000,0xe8000000,0xf23b0000)
  from space 10816K, 98% used [0xf3170000,0xf3bdbbb8,0xf3c00000)
  to   space 12096K, 0% used [0xf2460000,0xf2460000,0xf3030000)
 PSOldGen        total 1310720K, used 1000769K [0x98000000, 0xe8000000, 0xe8000000)
  object space 1310720K, 76% used [0x98000000,0xd5150440,0xe8000000)
 PSPermGen       total 172032K, used 169515K [0x88000000, 0x92800000, 0x98000000)
jasbaniAsked:
Who is Participating?
 
objectsCommented:
just send you standard logging to stdout

0
 
objectsCommented:
why don'yt you just log them both to the same file?

0
 
jasbaniAuthor Commented:
I think I won't be able to do that since I am not able to reproduce the issue at my wish. The CPU Starvation can happens any time during 24 hrs.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
objectsCommented:
how is your current logging handled?

0
 
objectsCommented:
> 504427.177: [GC [PSYoungGen: 1

the first number is the timestamp

some interesting stuff here if you want to visualize the output
http://sujitpal.blogspot.com/2006/08/charting-jvm-garbage-collection.html

0
 
jasbaniAuthor Commented:
Thanks for the above url. It looks good. But I want to compare the logs, if any of you guys know how to get  accurate timestamps from the GC on Solaris I would greatly appropriate it.
0
 
jasbaniAuthor Commented:
Agreed that first number is a timestamp but it won't give you but I cannot map it with the time stamp under SystemOut.log when the error hits.
0
 
objectsCommented:
theres already a timestamp at the beginjing of each line, see my earlier comment

0
 
objectsCommented:
naturally you will need to convert it :)

Though I still don't understand why you don't just log both to the same log file.

0
 
jasbaniAuthor Commented:
> 504427.177: [GC [PSYoungGen: 1

The above time stamp won't tell you the time what time the GC happened. It is showing the start time of next GC cycle or I would say time stamp when jvm started. How can i Map this time stamp with the SystemOut.log time stamp to see what was happening on GC when I hit CPU Starvation.
0
 
objectsCommented:
its the timestamp of the log entry, ie the time associated woiht the details it is logging
it would correspond to the timestamp in your app log

0
 
jasbaniAuthor Commented:
can you example,,,how can we relate two different logs without similar type of time stamp...
0
 
objectsCommented:
you have to either write something that converts them, or log both to the same file so you don't need to

0
 
jasbaniAuthor Commented:
I think writing logs to the same fine is a better idea, can you tell me how can I write both logs to the same file with example. Thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.