[lttng-dev] RFC LTTng session and daemon configuration save and restore

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Dec 5 14:49:56 EST 2013


On Thu, Dec 5, 2013 at 1:45 PM, Thibault, Daniel
<Daniel.Thibault at drdc-rddc.gc.ca> wrote:
>> Date: Wed, 4 Dec 2013 16:33:09 -0500
>>
>> Version:
>> - v0.2: 04/12/2013
>> [...]
>> Daemon configuration files are, by default, either stored system-wide under /etc/lttng/*.conf or in the user's home directory under $HOME/.lttng/*.conf.
>
>    Transient files  (lttng-sessiond.pid, etc., but not .lttngrc) are currently created under $HOME/.lttng/ (match) and /run/lttng/ (mismatch).  But I guess the difference between /run and /etc makes sense in this case.
>
>> Load sessions. If url the is a directory, all .lttng files it contains will be loaded. If session_name is NULL, all sessions found in url are restored.
>
> « If url the is a directory »?
>
>> int lttng_save_sessions(const char *url, const char *session_name int flags/struct lttng_session_save_attr *attr);
>
>    Missing commas.
>
Will fix, thanks.

>> If a session was saved as active, the tracing for that session will be activated automatically on load. [...]
>> Tracing sessions saved in an active state will be resumed on load.
>
>    But what if the trace files have gone missing in the mean time?  I think newly-loaded sessions should create new trace folders altogether (let the user decide how to merge the trace folders later).  This would be a good occasion to resolve the recurring problem of trace folder collisions (e.g. when a user-space app being traced per-processID dlcloses and dlopens its trace provider within a one-second window).  A simple solution is to use the snapshot approach, and have a "-%d" sequential sub-index added to the trace folder name to avoid the collision.
>    Or is the intent to have the conf files store only the "name" part of the sessions, without the timestamp part?  This prevents collisions only when the session is not configured with an output or set-url option.
>

Very good point. We should handle it like the snapshot option does
("-%d"). Since "auto-" is a reserved session name, we will be able to
create a new "default name" on load if the user never specified a
session name.

Thanks,
Jérémie

> 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/>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list