ptp4l logs with offset


Author
Message
AndygoesLogging
AndygoesLogging
New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)
Group: Forum Members
Posts: 5, Visits: 8
Hi, I have logs from the ptp4l service that log entries as a kernel uptime duration instead of real time or epoch duration. For example, the entries might be something like:

ptp4l[1234.567] message is here
ptp4l[1235.678] message is here

When I use ElapsedDecimal, it doesn't properly parse the seconds bit before the decimal, and I also cannot set an offset. Essentially what I'm doing is copying the log file and taking a system time of the machine at the same time so that I have the last entry very closely aligned with the datetime that I pulled the data.

I'd like to be able to convert the elapsed duration to a real DateTime stamp. Any tips on how to do that?
Replies
LogViewPlus Support
LogViewPlus Support
Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)
Group: Moderators
Posts: 1.2K, Visits: 4.3K
Glad that helped Andy.  I was just about to notify you of the new BETA release, but it sounds like you already found it.  Smile  We have also updated our documentation based on your feedback.

I am not sure if it makes sense to populate the Full Date Offset with the selected log entry timestamp.  On the one hand, I think - does it matter?  On the other, if I am offsetting the time for the whole log file, to me it makes sense to start with the first log entry.  Can you help me understand why you want to offset from the last log entry?


AndygoesLogging
AndygoesLogging
New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)
Group: Forum Members
Posts: 5, Visits: 8
Primarily, I don't have the start date for the log file, only the end date! Here's an example:

Log line 1:
ptp4l[160.209]: selected /dev/ptp0 as PTP clock

Log line 3761587:
ptp4l[3779291.106]: rms 14 max 32 freq -2649 +/- 18 delay 465 +/- 1

When I pull that log (this instance is ~256MB), I have a script to get the current time and store it in a date.txt file:
Mon Jun 24 13:17:18 UTC 2024

So I know the last line is approximately the timestamp in date.txt and I want to convert all other timestamps working backward from that time.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Login

Explore
Messages
Mentions
Search