Skip to content

Tooling

Archive Tool

Archive Tool allows you to validate, inspect and manage Aeron Archive data. You will need to know where your archive data is being stored and point the tool to that folder. If you have not specified this yourself, you can retrieve it from the ArchivingMediaDriver context – for example if your ArchivingMediaDriver was called archivingMediaDriver then the archive directory is found via archivingMediaDriver.archive().context().archiveDir().

Describe

Note

It is assumed that you're running ArchiveTool in the archive data folder and that you have built the Aeron all jar yourself, or downloaded it from Maven Central. If you are not running the tool from the archive directory, change the first argument from . to the correct directory.

Describe inspects the archive mark file and describes the data found in the folder.

java -cp aeron-all-*.jar io.aeron.archive.ArchiveTool . describe
INFO: Mark file exists: ./archive-mark.dat
12:18:43 (start: 2021-01-17 12:15:30, activity: 2021-01-17 12:18:42)
[MarkFileHeader](sbeTemplateId=200|sbeSchemaId=100|sbeSchemaVersion=1|sbeBlockLength=128):version=131328|activityTimestamp=1610903922296|startTimestamp=1610903730138|pid=68780|controlStreamId=10|localControlStreamId=11|eventsStreamId=30|headerLength=8192|errorBufferLength=0|controlChannel='aeron:udp?endpoint=localhost:8010'|localControlChannel='aeron:ipc'|eventsChannel='aeron:udp?control-mode=dynamic|control=localhost:8030'|aeronDirectory='/var/folders/_g/5yl15nqx2mj4f27ypd12tdqr0000gn/T/aeron-tmp'
Catalog Max Entries: 8192
[RecordingDescriptor](sbeTemplateId=22|sbeSchemaId=101|sbeSchemaVersion=4|sbeBlockLength=80):controlSessionId=0|correlationId=0|recordingId=0|startTimestamp=1610903730555|stopTimestamp=1610903730569|startPosition=0|stopPosition=640064|initialTermId=-509504339|segmentFileLength=134217728|termBufferLength=67108864|mtuLength=1408|sessionId=652242354|streamId=16|strippedChannel='aeron:ipc'|originalChannel='aeron:ipc'|sourceIdentity='aeron:ipc'

Dump

Dump outputs the content of the Archive to the console in hex format. You can specify how many fragments per recording should be dumped if needed.

Sample output from the SimplestCase example is below.

java -cp aeron-all-*.jar io.aeron.archive.ArchiveTool . dump
INFO: Mark file exists: ./archive-mark.dat
12:40:43 (start: 2021-01-17 12:15:30, activity: 2021-01-17 12:25:47)
[MarkFileHeader](sbeTemplateId=200|sbeSchemaId=100|sbeSchemaVersion=1|sbeBlockLength=128):version=131328|activityTimestamp=1610904347373|startTimestamp=1610903730138|pid=68780|controlStreamId=10|localControlStreamId=11|eventsStreamId=30|headerLength=8192|errorBufferLength=0|controlChannel='aeron:udp?endpoint=localhost:8010'|localControlChannel='aeron:ipc'|eventsChannel='aeron:udp?control-mode=dynamic|control=localhost:8030'|aeronDirectory='/var/folders/_g/5yl15nqx2mj4f27ypd12tdqr0000gn/T/aeron-tmp'
Catalog Max Entries: 8192

Dumping up to 9223372036854775807 fragments per recording


Recording 0
  channel: aeron:ipc
  streamId: 16
  stream length: 640064
[RecordingDescriptorHeader](sbeTemplateId=21|sbeSchemaId=101|sbeSchemaVersion=4|sbeBlockLength=32):length=119|valid=1|reserved=0
[RecordingDescriptor](sbeTemplateId=22|sbeSchemaId=101|sbeSchemaVersion=4|sbeBlockLength=80):controlSessionId=0|correlationId=0|recordingId=0|startTimestamp=1610903730555|stopTimestamp=1610903730569|startPosition=0|stopPosition=640064|initialTermId=-509504339|segmentFileLength=134217728|termBufferLength=67108864|mtuLength=1408|sessionId=652242354|streamId=16|strippedChannel='aeron:ipc'|originalChannel='aeron:ipc'|sourceIdentity='aeron:ipc'

Frame at position [0] data at offset [32] with length = 4
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 00 00 00 00                                     |....            |
+--------+-------------------------------------------------+----------------+

Frame at position [64] data at offset [96] with length = 4
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 01 00 00 00                                     |....            |
+--------+-------------------------------------------------+----------------+
...

Errors

Errors lists the errors raised in relation to the archive.

java -cp aeron-all-*.jar io.aeron.archive.ArchiveTool . errors
Archive error log:

Aeron driver error log (directory: /var/folders/_g/5yl15nqx2mj4f27ypd12tdqr0000gn/T/aeron-tmp):

PID

PID provides the PID of the process writing to the Archive

java -cp aeron-all-*.jar io.aeron.archive.ArchiveTool . pid
780