[ltt-dev] [RFC UST and LTTNG] Daemon model proposal v0.3
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Mon Jan 31 14:26:20 EST 2011
* David Goulet (david.goulet at polymtl.ca) wrote:
>
>
> On 11-01-31 02:06 PM, Mathieu Desnoyers wrote:
>> * David Goulet (david.goulet at polymtl.ca) wrote:
>>> Everything about a per-user ltt-sessiond will be added to the RFC!
>>>
>>> Comments below.
>>>
>>> On 11-01-31 12:10 PM, Mathieu Desnoyers wrote:
>>>> * David Goulet (david.goulet at polymtl.ca) wrote:
>>>>> This unique identifier SHOULD be a unique string consisting of the username, a
>>>>> session name and the number of already created session plus one. The last
>>>>> number makes sure that the ID is unique in the ltt-sessiond context. In the
>>>>> implementation, a simple number could be use for performance purpose instead of
>>>>> comparing string at each iteration.
>>>>>
>>>>> Ex: Username - "dave", Session name - "mysession", Num. sessions - fifth one
>>>>> --> ID: dave.mysession-5
>>>>
>>>> We will run into problems across reboots: session IDs might be reused, thus
>>>> trying to overwrite older traces. Other ideas, possibly including UUID, would be
>>>> welcome.
>>>
>>> Across reboot... I don't see the problem reusing IDs... The only problem
>>> to overwrite older traces is if the session ID is used in the trace path
>>> on the disk which is not the case.
>>
>> Then what do you propose using as directory name to hold the trace on disk ?
>> Using the session name would seem natural.
>
> Yep, absolutely for the first level directory but the trace file path
> should be quite different. We talked about something like this the other
> day :
>
> $sessionID/
> $appname-$date-$time-$PID
>
> having $sessionID the above proposition : dave.session_name-5
Well, that's where I see a problem:
if we gather a trace on a system from user "dave", with the same session name,
the incremented "unique" number is only unique as long as we don't restart
ltt-sessiond. So if we reboot the system, the same tracing session name will be
reused, rendering it non-unique.
I would really like drtrace to be able to work without requiring the user to
explicitely specify a session name. This is why using a UUID (truly unique ID)
would make sense as default session identifier. When the user specify the
session name, I see no point in trying to fixup the clash with a postfix: we
could simply return an error, saying that there is already a trace in there.
>
> The $time is a bit useless but makes the trace path "unique" since the
> case of having the same date, appname and PID can occur.
Sure, I agree on this one. Using "$appname-$date-$time-$PID" as subdirectory to
hold the per-application traces makes sense.
Thanks,
Mathieu
> I'm actually quite open for better suggestion :)
>
> I'll make sure the rest of that email is taking into account for the
> next version!
>
> Thanks
> David
>
> --
> David Goulet
> LTTng project, DORSAL Lab.
>
> PGP/GPG : 1024D/16BD8563
> BE3C 672B 9331 9796 291A 14C6 4AF7 C14B 16BD 8563
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list