Transport Files
In Aeron Transport, the Media Driver creates files in shared memory. It doesn't create any regular files in the filesystem. The shared memory files were covered in the Detailed Overview, but an example list of files is provided below.
Detect Multiple Instances¶
When the Media Driver starts, it checks whether an existing Media Driver is already running, using the same shared memory directory. It does this by checking the consumer heartbeat in the to-driver buffer in the cnc.dat file (the cnc.dat file will be covered later), which the Media Driver updates once per second. If a Media Driver is already running (last heartbeat within 10 seconds) using this directory, the new instance exits with an error. This stops the accidental start of a second Media Driver using this directory.
Clean start¶
When the Media Driver starts, once it has checked that there isn't an existing instance of a Media Driver running using the same shared memory directory, the entire shared memory directory is deleted. This means the Media Driver starts with a new directory every time, so no state (like counters) is carried over from a previous instance.
Example files¶
On Linux, shared memory buffers are mounted into the filesystem, which means you can list them simply by listing
the files in a subdirectory of /dev/shm
. Here's an example set of files, containing multiple Publications and
Image log buffers. Some of the Publication log buffers could be for IPC Publications and some for Network Publications.
cnc.dat
publications/18.logbuffer
publications/20.logbuffer
publications/22.logbuffer
publications/26.logbuffer
publications/33.logbuffer
publications/36.logbuffer
publications/38.logbuffer
publications/44.logbuffer
publications/52.logbuffer
publications/53.logbuffer
publications/73.logbuffer
publications/75.logbuffer
images/61.logbuffer
images/55.logbuffer
images/56.logbuffer
loss-report.dat