I think some data was lost. How can I confirm?¶
Problem¶
You believe some data sent over an Aeron UDP channel might have been lost and want to confirm.
Solution¶
Use the LossStat tool to review if any loss data was captured by Aeron.
Discussion¶
LossStat logs all the data loss events suffered by Aeron. You must point LossStat at the Media Driver folder specified in the Media Driver Context. For example, if your Media Driver context has the following:
final MediaDriver.Context mediaDriverCtx = new MediaDriver.Context()
.aeronDirectoryName("/dev/shm/md");
then the path provided to LossStat would be as follows:
java -cp aeron-all-*.jar -Daeron.dir=/dev/shm/md io.aeron.samples.LossStat
An example run:
#OBSERVATION_COUNT,TOTAL_BYTES_LOST,FIRST_OBSERVATION,LAST_OBSERVATION,SESSION_ID,STREAM_ID,CHANNEL,SOURCE
688,4167028,2020-08-16 13:53:39.053+0000,2020-08-16 13:53:41.003+0000,1155221173,8,aeron:udp?endpoint=10.1.1.1:4000;10.1.1.2:60950
This tells us the following about the session 1155221173
on channel aeron:udp?endpoint=10.1.1.1:4000
on stream 8 ⤌⤍ 10.1.1.2:60950
flow:
- there were 688 data loss events
- a total of 4,167,028 bytes were impacted
- the loss first happened at 2020-08-16 16:53:39.053+0000
- the last loss happened at 2020-08-16 16:53:41.003+0000
If there are no entries, then Aeron believes that no data was lost.