<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/08/2015 12:28 PM, Divya Vyas
wrote:<br>
</div>
<blockquote
cite="mid:CA+=dQ-_DGAtobYX8W=mQUyJMPD8LD4b6FQDrnC9SqmQr_0gWAA@mail.gmail.com"
type="cite">
<p dir="ltr"><br>
On Jan 8, 2015 10:12 PM, "Geneviève Bastien" <<a
moz-do-not-send="true" href="mailto:gbastien@versatic.net">gbastien@versatic.net</a>>
wrote:<br>
><br>
> Hi Divya,<br>
><br>
> I'm putting you back on the lttng-dev mailing list, please
reply to that list in the future so other people can answer,
because I think that trace synchronization is not exactly what
you are looking for here...<br>
</p>
<p dir="ltr">I am sorry I clicked reply instead of reply to all.</p>
<p dir="ltr">I have a host and on top of that I have multiple
guests. Suppose like from 9 to 9:30 I want to analyze the host
information as well as guest information in single view and in a
synchronized way. As the guest time is different from host . I
need the guest traces referenced at host time . and I
tracecompass I can see the host traces as well as guest traces
in a synchronized way.</p>
</blockquote>
Then your traces are taken at the same time. The ideal in your case
is to have your machines communicate, at least a few TCP packets
during the duration of the trace so they can be synchronized. If you
trace a virtual machine guest and host for 30 minutes, chances are
the time drift between the clocks is important so simple time
offsetting at a point that you know (either the beginnings of the
trace or a precise point in the trace) will correlate justly the
traces at this point but the further you go from there, the less
accurate the time will be. Trace synchronization accounts for the
time drift so if you have accurate synchronization, then the same
accuracy applies to the whole trace.<br>
<br>
Also, I may point you to a recently contributed Virtual Machine
Analysis. Part of it is in master, some still on gerrit (the view
for instance). The documentation is still unexistent. It works with
the Qemu/KVM virtualizer, and needs some custom compilation of
lttng-modules on both guest and host. It is still experimental. It
allows to associate a host process with a guest CPU so that you can
see on the guest whether the CPU was actually running or preempted
on the host. If you're using Qemu/KVM and are interested in this
analysis, I can work on the documentation sooner than later.<br>
<br>
<br>
<blockquote
cite="mid:CA+=dQ-_DGAtobYX8W=mQUyJMPD8LD4b6FQDrnC9SqmQr_0gWAA@mail.gmail.com"
type="cite">
<p dir="ltr">I hope now I gave the clear picture of what I am
doing. Please let me know if u need some explanation. <br>
><br>
>> I tried the sessions at same time and communication
events in between and it worked :)<br>
>> I am getting quality as accurate and I can see both
traces merged .<br>
><br>
> Excellent!<br>
><br>
>><br>
>> Now I come at my second point i.e taking traces from
lttng sessions at different machines and at different time and
may be communication events or might be not.<br>
><br>
> If the sessions are taken are different moments, they can
_never_ synchronize.</p>
<p dir="ltr">Yes I think you told that they can be analyzed by
applying offset but not synchronized. </p>
<p dir="ltr"> Trace synchronization first matches events such that
one single event from a trace (for example "sending a packet")
can be correlated to exactly one event in the second trace (the
reception of that packet). If that is the case, the first event
can have a timestamp of now and the second be timed to January
1st 1970, trace synchronization will work and the 2 traces will
have a common time reference after synchronization.</p>
<p dir="ltr">What is the criteria of timestamps to be
synchronized? How much two timestamps matched for
synchronization<br>
</p>
</blockquote>
There is no criteria for the timestamp. Matching events is the
important part of the process. If you are interested in trace
synchronization, I invite you to read this article by Masoume
Jabbarifar [1]. It is at the base of what is implemented in Trace
Compass.<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://link.springer.com/article/10.1007/s10922-014-9331-7#page-1">http://link.springer.com/article/10.1007/s10922-014-9331-7#page-1</a><br>
<br>
<br>
Geneviève<br>
<br>
<br>
<br>
<blockquote
cite="mid:CA+=dQ-_DGAtobYX8W=mQUyJMPD8LD4b6FQDrnC9SqmQr_0gWAA@mail.gmail.com"
type="cite">
<p dir="ltr">
><br>
><br>
>><br>
>> So In my opinion I need to apply time offset on one of
the trace to match the beginning so that they can be
synchronized . <br>
>><br>
>> So like first trace timestamp starts at 07:13:59 .499
222 870 and other starts at 11:21:35.537 682 885 . Then I can
apply timeoffset ( How much offset ? In apply time offset
advanced option If reference time is 7:13.... then target time
will be 11:21:35... it will calculate the offset ) on one of the
trace to match traces .<br>
>><br>
>> Is it possible to synchronize the traces then ?
Actually I tried these steps but not getting the synchronized
traces but then both traces beginning is exactly same (
obviously it will as applied by the offset) <br>
>><br>
>> Please let me know how can I synchronize the traces
from different machines and at different time <br>
><br>
> I'm not sure what your end goal is exactly. Do you want to
compare trace executions? I am cc'ing François Doray who is
currently working on a trace comparison utility. Here's a
presentation he did recently: <a moz-do-not-send="true"
href="http://ahls.dorsal.polymtl.ca/system/files/Comparison%20of%20Traces%20to%20Diagnose%20Performance%20Variations.pdf">http://ahls.dorsal.polymtl.ca/system/files/Comparison%20of%20Traces%20to%20Diagnose%20Performance%20Variations.pdf</a><br>
><br>
> His work is still experimental and available on github. If
that's what you're interested in, he might give you some
information on how to use it.<br>
><br>
> Otherwise, please explain what you are trying to achieve.<br>
><br>
> Geneviève<br>
><br>
><br>
><br>
>> <br>
>><br>
>><br>
>> On Thu, Jan 8, 2015 at 12:39 AM, Geneviève Bastien <<a
moz-do-not-send="true" href="mailto:gbastien@versatic.net">gbastien@versatic.net</a>>
wrote:<br>
>>><br>
>>> On 15-01-07 11:32 AM, Divya Vyas wrote:<br>
>>>><br>
>>>> Hi ,<br>
>>>><br>
>>>> I have some comments below and thanks a lot for
your help<br>
>>>><br>
>>>> On Jan 7, 2015 7:55 PM, "Geneviève Bastien"
<<a moz-do-not-send="true"
href="mailto:gbastien@versatic.net">gbastien@versatic.net</a>>
wrote:<br>
>>>> ><br>
>>>> > Hi Divya,<br>
>>>> ><br>
>>>> ><br>
>>>> > On 15-01-07 01:24 AM, Divya Vyas wrote:<br>
>>>> >><br>
>>>> >><br>
>>>> >> Hi Genevieve,<br>
>>>> >><br>
>>>> >> My target to is merge the traces of
two different machines taken on different time or same time .<br>
>>>> ><br>
>>>> > Trace synchronization works by first
matching events corresponding to the sending and the reception
of a TCP packet from both traces, and then taking those matched
events and computing a formula that will transform timestamps
from one trace to the same clock as another trace. So only
traces taken at the same time (meaning together, not the same
clock time of course) will work.<br>
>>>><br>
>>>> I am not getting this last point , where the
traces are taken together. You mean that we start lttng session
on two machines at around same time and then during session use
some communication events . Then take the traces into
tracecompass for synchronization in experiment. I am not
getting in which cases time offset is needed?<br>
>>><br>
>>><br>
>>> Yes, two sessions on two machines at the same time
and they communicate during those sessions. Then you can
synchronize traces. The following traces are used in unit tests
to test trace synchronization if you wish to see what it looks
like: <a moz-do-not-send="true"
href="http://archive.eclipse.org/tracecompass/test-traces/ctf/synctraces.tar.gz">http://archive.eclipse.org/tracecompass/test-traces/ctf/synctraces.tar.gz</a><br>
>>><br>
>>>> In what traces I need to apply time offset so
that their beginning matches. Is it applicable on the above case
which I am thinking above.<br>
>>><br>
>>><br>
>>> You never _need_ to apply time offset. It is if you
have traces that do not contain communication events, and you
want one of them to be offsetted by a certain time. For example,
you have a trace taken GST-5 and one at GST, you cannot
synchronize them because they don't have communication events
but you want to analyze them with the same time reference, you
would offset the one at GST-5 by +5 hours.<br>
>>><br>
>>> Or if you have a custom event that you know
happened at the same time on both traces, but synchronization
does not support that event, then you can offset one trace so
that both events from both traces have the same timestamp.<br>
>>><br>
>>> Time offsetting is a manual process by the user,
while trace synchronization is an automatic analysis using
pre-defined events to compute a formula to transform timestamps
from one trace to the same clock as the other.<br>
>>><br>
>>>> ><br>
>>>> ><br>
>>>> >><br>
>>>> >> Actually synchronization was not
working on different machine so I tried on same machine. But
now I got it correctly I think so :)<br>
>>>> ><br>
>>>> > Indeed, you have the right events now,
with the net_dev_queue and netif_receive_skb. So you should be
OK. But I *think* this method works only when on a LAN. If your
computers communicate through internet, you're better off with
the inet_sock_local_[in|out] method<br>
>>>><br>
>>>> They are connected through LAN only.<br>
>>>><br>
>>>> ><br>
>>>> >><br>
>>>> >> For different time we need to apply
offset so that their beginning matches. I think I need to do
this .<br>
>>>> >><br>
>>>> >> I tried applying offset on eclipse
luna ( I added linux tools in install new software) but I am
not getting this option " Apply time offset ". <br>
>>>> ><br>
>>>> > It is in master only so far, so you should
use tracecompass to have this option.<br>
>>>> ><br>
>>>> >><br>
>>>> >> I tried on tracecompass also, where I
am getting time offset option but the synchronization view is
empty . The window is not showing anything. The tracecompass
version is 0.1.0<br>
>>>> ><br>
>>>> > The time offset does not involve
synchronization at all, it is just an offset, so you would not
see anything in the synchronization view. But in the
"Properties" view, when you select the trace, the time offset is
displayed.<br>
>>>><br>
>>>> I meant to say that I tried synchronizing the
traces in tracecompass without time offset . The synchronizing
view is empty.<br>
>>>> It should show at least quality absent etc.<br>
>>><br>
>>><br>
>>> Quality absent would show only if the traces are
from different machines. If you are trying to synchronize traces
from the same machine, that view will stay empty. <br>
>>><br>
>>> Geneviève<br>
>>><br>
>>><br>
>><br>
><br>
</p>
</blockquote>
<br>
</body>
</html>