[lttng-dev] LTTng snapshot howto
Thibault, Daniel
Daniel.Thibault at drdc-rddc.gc.ca
Mon Jul 29 10:50:29 EDT 2013
Date: Sun, 21 Jul 2013 14:27:52 -0400
From: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
[...]
> $ lttng create --snapshot
> $ lttng enable-event -k -a # enable kernel tracing
> $ lttng enable-event -u -a # enable user-space tracing
> $ lttng start
[...]
> Each "lttng snapshot" command records a snapshot of the current buffer state. "lttng enable --snapshot" automatically setups the buffers in overwrite mode for flight recording, and does not attach any output file to the trace. The "lttng snapshot record" command can be performed either while tracing is started or stopped.
That should rather be "'lttng create --snapshot' automatically sets up the buffers in overwrite mode [...]".
I see that the snapshot actions all check for the no-output session flag. So one can set up a no-output session where the buffers are nevertheless in discard mode, meaning they will fill up and then tracing effectively stops. The snapshot command can later recover the buffer contents. But could we then have either an additional snapshot command (e.g. 'lttng snapshot flush') or a record action option (e.g. 'lttng snapshot record --flush') that would flush the buffers? This way, one could start a session in discard mode, snapshot the filled buffers to disc at some point after tracing has "stopped", then flush them in order to capture another batch of events. I know it seems like an unlikely use-case, but why not? (I think a flush record option AND a flush action can be useful, allowing the user to flush the buffers either with or without taking a snapshot)
Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>
More information about the lttng-dev
mailing list