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
- compile an MPS that will emit telemetry-log-events: such as variety.ti (make -f xcppgc.gmk VARIETY=ti)
- link your test program with it
- 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
- then the EVENT_XYZ() macros in the MPS source will 'emit' events, with parameters (the X, Y, Z, etc)
- events go into an event buffer
- on mps_arena_destroy, or when the buffer is full, it gets written out via the plinth mps_io_write() funciton
- if you're using the example ANSI plinth (code in mpsioan.c), this will be wherever this ends up:
(commonly in /mpsio.log, ie. at root of startup volume, which is hopefully writeable?)f = fopen("mpsio.log", "wb");
- this gives you an impenetrable binary file
- you can try using the "eventcnv" tool, but its output is almost as cryptic as the binary
- 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. |
C. Copyright and License
This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.