Lola – Stream-based Runtime Monitoring
Lola is simple and expressive stream-based specification language: it can describe both correctness/failure assertions along with interesting statistical measures. It combines the ease-of-use of rule-based specification languages with the expressive power of heavy-weight scripting languages or temporal logics previously needed for the description of complex stateful dependencies. The language comes with two key features: template stream expressions, which allow parameterization with data, and dynamic stream generation, where new properties can be monitored on their own time scale. We give an overview on the development and the current state of our tool in addition to a series of applications, which demonstrate the capabilities of the specification language Lola and its descendants.
The tool is available as a pre-compiled binary for MacOS X and Linux. For MacOS a working Swift 4 environment is required, for Linux the necessary environment can most easily be obtained via a Docker container here.
$ ./Lola --help ./Lola options: -h,--help show this help and exit -s,--specification <Lola specification file> --csv <Input trace file> optional: reads offline input from specified CSV-file --csv-skip-header skip csv header --binary <Input trace file> reads binary input from file, "-" for stdin --statistics display statistics --hide-trigger do not print triggers --print-outputs display monitor outputs --analysis perform specification analysis only --depgraph print dependency graph in dot format --debug display debugging information --delimiter <char> set delimiter for CSV (default: ",") and stdin (default: " ")
You need to provide a valid Lola specification using the
Two types of inputs are possible:
- CSV: A
.csvfile can be provided using
--csv <filename>, otherwise stdin is used.
- Binary: A
.datfile can be provided via
--binary <filename>. If
--binary -is specified, binary input is read from stdin.
A dot -representation of the dependency graph can be generated by executing
./Lola -s spec.lola --depgraph.
Synthetic Test Data
The synthetic test data was generated with a python script contained in the archive below. It generates a trace file containing floating point values of arbitrary length and column width, either in CSV-format or in a Binary representation. By executing
python3 randomDouble.py --help, the list of commandline options is displayed.
Amazon Review Data
The provided folder contains the Lola specification. The
.csv-files containing product review rating data from Amazon can be obtained from here. (The ratings-only .csv files are sufficient for our specification.)
The number of unique product identifiers can be computed via:
cut -d , -f 2 ratings_Amazon_Instant_Video.csv | sort | uniq | wc -l.
All specifications, scripts and our raw data can be downloaded here.
All experiments were executed on a Macbook Pro (2016) laptop with a quadcore 2.7GHz i7 CPU, 16 GB RAM and an Apple SSD.
Varying input rates
To modify the input rate to the monitoring process, we use the cstream tool with its
-t-option to slow down the incoming pipe. This works best for binary input data, where the size of every event is fixed. To have an input rate of 10Hz for a specification with three floating point inputs (24 Bytes per event), the call would be:
$cat trace.dat | cstream -O f -b 24 -t -240 | ./Lola -s spec.lola --print-outputs --binary -.
Time and Memory measurements
Within the program, we measure time by using timer facilities and output them after the monitor has finished.
Memory is measured via the maximum resident set size of the process using a Mach Kernel call. On Linux, this may be done externally using the GNU time utility.
- The binary input does not support variable-length types, i.e. no String inputs are available.
- Only a global frequency on all output streams is allowed in the specification.
- The two largest categories (Books, Clothing & Shoes and Jewelry) cannot be handled by the tool in reasonable time (3hr) due to the large number of instances, which leads to swap memory use.
Towards Intelligent System Health Management using Runtime Monitoring.Christoph Torens, Florian-Michael Adolf, Peter Faymonville, Sebastian Schirmer.
AIAA Information Systems-AIAA Infotech @ Aerospace. Grapevine, Texas.
A Stream-based Specification Language for Network Monitoring.Peter Faymonville, Bernd Finkbeiner, Sebastian Schirmer and Hazem Torfah.
LOLA: Runtime Monitoring of Synchronous Systems.Ben d’Angelo, Sriram Sankaranarayanan, Cesar Sanchez, Will Robinson, Bernd Finkbeiner, Henny B. Sipma, Sandeep Mehrotra, Zohar Manna.