Re: Flight recorder mode
Jan Kiszka <[email protected]> Wed, 20 Feb 2008 15:54:55 +0100
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <[email protected]> |
Mathieu Desnoyers wrote: > * Jan Kiszka ([email protected]) wrote: >> Mathieu Desnoyers wrote: >>> * Jan Kiszka ([email protected]) wrote: >>>> Jan Kiszka wrote: >>>>> Mathieu Desnoyers wrote: >>>>>> * Jan Kiszka ([email protected]) wrote: >>>>>>> Mathieu Desnoyers wrote: >>>>>>>> * Jan Kiszka ([email protected]) wrote: >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I'm trying to understand the flight recorder mode (including the hybrid >>>>>>>>> one) of LTTng. I originally expected that this mode means: >>>>>>>>> >>>>>>>>> 1. Fixed set of buffers, older data will be overwritten on wrap-around >>>>>>>>> 2. Limited size of trace files >>>>>>>>> >>>>>>>>> While 1. seems to be true, 2. is neither what I observe in the output >>>>>>>>> directory (flight-cpu_* get larger and larger) nor what I can find in >>>>>>>>> lttd's code. Intentionally? >>>>>>>>> >>>>>>>> Yep, see the other lttctl options and the quickstart guide to see how to >>>>>>>> spawn one lttd for the "normal" channels and a different one for the >>>>>>>> flight recorder channels (should be done after you stop tracing). >>>>>>> Sorry, /me is too blind: The quickstart guide is not mentioning flight >>>>>>> recorder or hybrid mode, and also lttctl --help gives me no hint what >>>>>>> pattern to apply for achieving limited trace file sizes. >>>>>>> >>>>>> Hrm, or do I recall doing documentaion I haven't done, let's see :) >>>>>> >>>>>> Ah, it's in a mailing list, not in the documentation yet : >>>>>> >>>>>> http://osdir.com/ml/linux.kernel.tracing/2006-09/msg00015.html >>>>>> >>>>>> It explains how to use the hybrid mode. I'll cut'n'paste it at the end >>>>>> of the quickstart guide. >>>>>> >>>>>> There is not trace file size limit you can give to lttctl nor lttd. You >>>>>> can only specify the buffer size. The idea is that you can decide at >>>>>> which moment you want to take you flight recorder "snapshot" by running >>>>>> lttctl -f at the correct moment. >>>>> OK, -EBRAINSUSPENDED, you just woke it up again: >>>>> >>>>> lttctl -b -n mytrace -m flight -l <debugfs>/ltt >>>>> <run application> >>>>> <when something happened:> >>>>> lttctl -f -n mytrace -t <trace-out> -l <debugfs>/ltt >>>> Hmm, in fact this won't fly yet. It looks like I need the hybrid mode, >>>> because flight recorder traces generated like above are lacking some >>>> basic information (stuff under /control I guess) to make lttv happy. >>>> >>>> That leaves me with a (for now) acceptable tracing procedure via hybrid >>>> traces. But I'm still lacking some howto for pure flight recorder >>>> traces. Any hints still appreciated... :) >>>> >>> Hrm, LTTV should be able to cope with the missing control information. >>> The only tracefiles that needs to be complete are the facilities >>> tracefiles. >>> >>> What do you get when you start lttv on a flight recorder trace ? >> What I did: >> 1. armall >> 2. lttctl -n mytrace -l /sys/kernel/debug/ltt -b -m flight > > Ah, I see.. try to change -b for -d : it will spawn an lttd daemon which > will read the "normal" channels (in this case, only the facilities > tracefiles). (also add -l /sys/kernel/debug/ltt -t /tmp/trace) > > It should then start working better. Perfect! That's now the behavior we already had with an ancient version and that I wanted to recreate with latest LTTng. You see what kind of howtos it takes for dummies like me? :-> (Means: Please add both the flight and hybrid mode scenario to the quickstart.) Thanks a lot, Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux