Telemetry Log Events

1. Introduction

Here's a collection of notes about the "telemetry log event" system of the MPS.

Not confidential. Readership: MPS users and developers. Status: incomplete.

2. Terminology

event
a compact binary record generated by the MPS to report what it is doing or what it has done
log
the collected stream of all these Events generated by the MPS
telemetry
the idea that the MPS emits all these Events, so they can be analysed by something else outside the MPS

Different parts of the MPS use "Event", "Log", or "Telemetry", even though they basically mean the same thing. It's a right nuisance, and I'm sorry. I've called this document "telemetry log events" to reinforce how closely linked the concepts are.

3. Overview

  1. compile an MPS that will emit telemetry-log-events: such as variety.ti (make -f xcppgc.gmk VARIETY=ti)
  2. link your test program with it
  3. MPS will try to read an 8-bit event mask from your environment -- the default is no events (ha ha!) -- so try:
     export MPS_TELEMETRY_CONTROL=255 ./mytestprogram 
  4. then the EVENT_XYZ() macros in the MPS source will 'emit' events, with parameters (the X, Y, Z, etc)
  5. events go into an event buffer
  6. on mps_arena_destroy, or when the buffer is full, it gets written out via the plinth mps_io_write() funciton
  7. if you're using the example ANSI plinth (code in mpsioan.c), this will be wherever this ends up:
     f = fopen("mpsio.log", "wb"); 
    (commonly in /mpsio.log, ie. at root of startup volume, which is hopefully writeable?)
  8. this gives you an impenetrable binary file
  9. you can try using the "eventcnv" tool, but its output is almost as cryptic as the binary
  10. or you could write your own log analysis tool in Python

4. Notes

[ Documentation is tricky: patchy, and some is convincing but obsolete. RHSK 2006-05-11 ]

Some scruffy notes: 1150telem.txt.

A. References

B. Document History

2006-05-11 RHSK Created.
2006-05-22 RHSK Two plain-text files of notes combined into one.