cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp in Java log and trace files.

teddylv_andersen2
Active Participant
0 Kudos

Hi SAP'ies

Running PI 7.11 on AIX 6.3 we face an issue with the content of log and trace files from Java.

Eg.

The file DefaultTrace_00.0.trc is timestamped 18-05-10 11:16:15. (The same time as the time of the OS/AIX)

Looking inside the file the last statement is timestamped 2010 05 18 09:16:15.

How can we ensure that the content of these Java files are timestamped with OS time?

Looking into ABAP files like dev_w0 the timestamp of the file and the content are equal.

Best regards,

Teddy Løv Andersen

Accepted Solutions (0)

Answers (1)

Answers (1)

markus_doehr2
Active Contributor
0 Kudos

> The file DefaultTrace_00.0.trc is timestamped 18-05-10 11:16:15. (The same time as the time of the OS/AIX)

> Looking inside the file the last statement is timestamped 2010 05 18 09:16:15.

There are various reasons:

- nothing was put inside the logfile since

- the logfiles rotate so the newest logfile may be a different one due to its size

Markus

teddylv_andersen2
Active Participant
0 Kudos

Hi Marcus.

The files contain entries, but this entries are timestamped with a time that is 2 hours earlier than the file. Like GMT vs CET(DST).

Teddy

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

Make sure that Time Zone of your SAP system match with your OS time zone. Check in transaction STZAD for time zone of your SAP system and compare it with OS. It should be same.

Thanks

Sunny

teddylv_andersen2
Active Participant
0 Kudos

Hi Sunny.

In STZAD both 'system and user default time zone' is set to CET and 'Time Zone Active' is tickmarked. Isn't this a setting for the ABAP stack?

Logs and traces in the ABAP stack are correct, it's only logs and traces in the Java stack that have the issue.

Best regards,

Teddy

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

Then I think it is correct. As mentioned by Markus if you have set log level in Java to Error and if there is no Error then trace will not get updated.

Thanks

Sunny

teddylv_andersen2
Active Participant
0 Kudos

Hi Sunny.

The reason is NOT that we do not get any entries in the Java default trace, because we for sure get entries in the default trace.

We have been running a lot of debugging in the system, that's why we saw the issue.

Teddy

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

Could you please check in visual admin what is the log level you have set ?

Thanks

Sunny

teddylv_andersen2
Active Participant
0 Kudos

Hi Sunny.

The trace/reporting level is of no interrest here. I get the following entry every hour!

Inside default trace:

#2.0 #2010 05 19 12:16:16:122#+00#Error#com.sap.engine.services.rfcengine#

File properties:

-rw-rr 1 ppiadm sapsys 1130783 May 19 14:16 defaultTrace_00.0.trc

Teddy

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

For me it looks like you have set trace level to Error in Visual Admin that's why you are getting this entry. Go to visual admin and change trace level to Info and then check.

Thanks

Sunny

nelis
Active Contributor
0 Kudos

Why are you so concerned with the time difference ?

If the time stamp on the actual log entries was ahead of the time stamp of the log file then I would be worried, but it's not. It's behind for reasons already mentioned.

The time stamp on the actual log file will always be ahead unless by some chance the application logging to it closes the file immediately, which is not always the case. My guess is the trace is keeping the file open till what ever you are running has completed, during which time it may or may not have logged data.

Nelis

teddylv_andersen2
Active Participant
0 Kudos

SOLUTION:

Timestamp inside files changed to CET/DST by using Java parameter

-Duser.timezone = Europe/Copenhagen

Value is set by using Configtool

Edited by: Teddy Løv Andersen on May 25, 2010 3:54 PM

Former Member
0 Kudos

Hello All

Best way to convert the default trace time is , visit the site

http://www.csgnetwork.com/epochtime.html

here enter , for example if you have the following in default trace

#1.#00265510DE7300120000000F000022030004C77AD7309DF5#1345230317066#com.sap.portal.fpn.rdl

1345230317066   is time stamp , enter this in the above site to get the time

Fri Aug 17 2012 21:05:17 GMT+0200

Regards