Getting grip on eventlogs in OMNeT++

This entry was posted by on Monday, 12 December, 2011 at

OMNeT++ simulations can export an eventlog. Though the manual is pretty complete about it, I’ll summarise it here.

In the omnet ini file:

sim-time-limit = 100s # sufficiently large
warmup-period = 20s
record-eventlog = true
eventlog-recording-intervals = 90..100

First, we want the simulator to run for 100 seconds. We want it to warm up for 20 seconds. This has influence on your scalars (if you put a check for simTime >= warmupPeriod on your loggers) and the new logging system (check omnetpp4.2 for this) but does not affect the eventlog.

We enable eventlogging, but be ware: the size of this file grows very rapidly to astronomic proportions. So say we are doing some simulation and want a trace of the last 10 seconds. Then we set a recording interval to do so. Unfortunately, for my setup (omnetpp4.1) the recording intervals do not work, severely limiting the usability of event traces: a simulation containing many nodes for a duration of 100 seconds results in HUGE eventlogs. Would be nice to only capture the last 10 seconds (this is possible with OMNeT++ 4.2).

Luckily – if the eventlog did fit on disk to begin with – we can trim it:

> eventlogtool filter -ft 90 myScenario.elog > last10seconds.elog

Then we can also select only certain modules:

eventlogtool echo -mi 27 268 270 271 272 273 last10seconds.elog > host22_last10seconds.elog

In this case, host22 is module 27 and has submodules (the appl, netw, nic, mac and phy). But for some reason it does not work consistently, going through the elog before -mi I can find events related to modules passed to eventlogtool to filter, but they are omitted. I do not know if this is a bug in eventlogtool or if I’m doing something wrong here. Just check to make sure you know what you’re looking at!

See also:
Syntax highlighting for elog files in Vim

Leave a Reply