?
Solved

Date/TimeStamp in Native Logs for GC

Posted on 2009-02-23
14
Medium Priority
?
1,600 Views
Last Modified: 2013-12-21
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)
0
Comment
Question by:jasbani
  • 8
  • 6
14 Comments
 
LVL 92

Expert Comment

by:objects
ID: 23716660
why don'yt you just log them both to the same file?

0
 

Author Comment

by:jasbani
ID: 23718373
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
 
LVL 92

Expert Comment

by:objects
ID: 23718532
how is your current logging handled?

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 92

Expert Comment

by:objects
ID: 23718541
> 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
 

Author Comment

by:jasbani
ID: 23727863
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
 

Author Comment

by:jasbani
ID: 23727883
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
 
LVL 92

Expert Comment

by:objects
ID: 23727885
theres already a timestamp at the beginjing of each line, see my earlier comment

0
 
LVL 92

Expert Comment

by:objects
ID: 23727909
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
 

Author Comment

by:jasbani
ID: 23730156
> 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
 
LVL 92

Expert Comment

by:objects
ID: 23730172
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
 

Author Comment

by:jasbani
ID: 23734107
can you example,,,how can we relate two different logs without similar type of time stamp...
0
 
LVL 92

Expert Comment

by:objects
ID: 23739717
you have to either write something that converts them, or log both to the same file so you don't need to

0
 

Author Comment

by:jasbani
ID: 23747693
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
 
LVL 92

Accepted Solution

by:
objects earned 750 total points
ID: 23750490
just send you standard logging to stdout

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question