Skip to content

Commit 3c35843

Browse files
committed
extras: timestamp for journal entries
... to allow nanosecond resolution.
1 parent 3e86c09 commit 3c35843

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

draft-richardson-opsawg-pcapng-extras.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,47 @@ The systemd Journal Export Block has the following fields:
176176
can be present.
177177

178178

179-
The options defined in {{I-D.tuexen-opsawg-pcapng}}, section "Options"
180-
(opt_endofopt, opt_comment, opt_custom, ...) are valid within this block.
181-
There are currently no additional options definied for Journal Export
182-
Blocks.
179+
Aside from the options defined in {{I-D.tuexen-opsawg-pcapng}},
180+
section "Options" (opt_endofopt, opt_comment, opt_custom, ...),
181+
the following options are valid within this block:
182+
183+
| Name | Code | Length | Multiple allowed? |
184+
| jeb_timestamp | 2 | 12 | no |
185+
{: #options_jeb title='Journal Export Block Options'}
186+
187+
188+
189+
~~~~
190+
1 2 3
191+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
192+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
193+
0 | Option Type = 0x00000002 |
194+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
195+
4 | Timestamp Seconds (High) |
196+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
197+
8 | Timestamp Seconds (Low) |
198+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
199+
12 | Timestamp Nanoseconds |
200+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
201+
~~~~
202+
{: #format_jeb_timestamp title='Journal Export Block Timestamp Format' artwork-align="center"}
203+
204+
{: indent='8'}
205+
jeb_timestamp:
206+
: This option allows providing an extended precision timestamp for the
207+
captured journal entry. While microsecond resolution is a good choice
208+
for general system logging, debugging and tracing use cases covered by
209+
pcap-ng benefit from more precise timestamps to correlate other events.
210+
211+
The timestamp is in units of that have elapsed since 1970-01-01 00:00:00 UTC.
212+
Note that these are 3 32-bit fields using the endianness indicated by the
213+
Section Header Block. The third word is always nanoseconds and unaffected by
214+
timestamp resolution options elsewhere.
215+
216+
Even if this option is used, the __REALTIME_TIMESTAMP field MUST still be
217+
present in the journal entry. The two items SHOULD have the same value
218+
(ignoring the difference in precision).
219+
{: vspace='0'}
183220

184221

185222
## Alternative Packet Blocks (experimental)

0 commit comments

Comments
 (0)