Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] lttng getting started : Sample "Custom Text Parser" config & files ?

Hi Patrick,

 

Thanks for your info – it’s very logical (but I wouldn’t have guessed there’s an “input

Translation format” and “output translation format”).

 

I’m getting the data from my custom parsers as event tables now, but unfortunately

I still don’t see any events in the time chart or Histogram from my custom parsers.

 

Re “Shared Launch Configurations”

If you choose Run > Debug… and switch to the “Common Tab” you can select “Shared”.

The Launch will then be persistent as “launchName.launch” in one of your open projects.

 

When you checkin that project into your CM system and a team member updates that project,

They immediately see the shared Launch.

 

The approach doesn’t work perfectly well since using such a shared launch you often

modify the Launch without intention to do so; then you get out-of-sync with the

team-shared version. But for custom parsers, it seems a good approach for me to

have a “magic file extension” and automatically pick up all parsers in the workspace

which match that magic file extension, sine parsers wouldn’t typically be changed.

 

There’s certainly other approaches possible for team-sharing custom parsers, but

this one would seem very flexible and natural to me since you’d automatically

benefit from the project system and CM integrations.

 

HTH,

Martin

--

Martin Oberhuber, SMTS / Product Architect – Development Tools, Wind River

direct +43.662.457915.85  fax +43.662.457915.6

 

From: linuxtools-dev-bounces@xxxxxxxxxxx [mailto:linuxtools-dev-bounces@xxxxxxxxxxx] On Behalf Of Patrick Tasse
Sent: Wednesday, November 21, 2012 5:50 PM
To: Linux Tools developer discussions
Subject: Re: [linuxtools-dev] lttng getting started : Sample "Custom Text Parser" config & files ?

 

Hi Martin,

Thanks for trying our stuff, it's always helpful to have fresh minds looking at it ;)

I guess the dialog is a bit confusing, maybe we should add some tool tips.

The path of the time stamp inside the parser goes like this:
1. your line's regular _expression_ group captures some characters (ie. java Pattern)
2. you identify this group as the event's Time Stamp
3. you specify the input "format" of these characters for conversion from text to Date (java SimpleDateFormat)
4. you specify the output "Time Stamp Format" for conversion from Date to text (java SimpleDateFormat) which is what table shows

3 and 4 allows the flexibility to display a different date and time format than the input text.

So your problem is in step 3, the "format" should not be a regex pattern but a SimpleDateFormat,
e.g. to convert "0:0:0.1" to a Date it would be something like "H:m:s.S".

Your other comments are welcome, I will look at implementing them. Clock adjustment is definitely something that's been in our future plans for a long time. The custom parser also don't support generic numbers (e.g. anything that doesn't fit in SimpleDateFormat), that could be improved.

Unfortunately you lose me with "Shared Launch Configurations", I'm not familiar with how those are implemented... I'll need more explanation about how that would work.

Thanks,
Patrick

On Wed, Nov 21, 2012 at 4:02 AM, Oberhuber, Martin <Martin.Oberhuber@xxxxxxxxxxxxx> wrote:

Hi Patrick,

 

Thanks for your reply – I’ve found the “Manage Custom Parsers”, that’s indeed well hidden for import / export J

 

I’ve also been able to fix my original trace import issue: All fields had been parsed OK, but the time stamp could not be parsed.

It’s not intuitive that there are TWO fields for the “time stamp” and both must be in sync.

See attached screenshot.

 

Now with the fixed parser, I can see my custom log rendered as a table, and an entry is shown in the Time Chart,

But I see no X-axis in the time chart and no events. Could it be that a CTF trace is required in addition to my custom traces ?

Or what else am I missing ?

I’m attaching my exported projects as ZIP for reference.

This is with the latest Linuxtools from Hudson BTW.

 

Not seeing my custom trace in the time chart or histogram is the biggest problem for me.

Some other things I’ve noticed –

-          When I import a text log, the “Linked Resource” is created with an absolute path. I think that a relative path should be used when possible such that the project can be team-shared.

-          When I export a custom parser into an Eclipse project location, the resource gets out of sync (workspace update is missing). I think exporting into an Eclipse project is important for team-sharing.

-          Importing multiple custom parsers in one step is missing. Maybe an approach like with Shared Launch Configurations would be better for custom parsers.

-          Some of my traces have integer timestamps (nnnnnnnn) with clocktick resolution. Would be interesting to get these converted + apply a time offset for correlating with other traces (but I could also preprocess using perl or similar).

 

 

Thanks,

Martin

--

Martin Oberhuber, SMTS / Product Architect – Development Tools, Wind River

direct +43.662.457915.85  fax +43.662.457915.6

 

From: linuxtools-dev-bounces@xxxxxxxxxxx [mailto:linuxtools-dev-bounces@xxxxxxxxxxx] On Behalf Of Patrick Tasse
Sent: Tuesday, November 20, 2012 5:46 PM
To: Linux Tools developer discussions
Subject: Re: [linuxtools-dev] lttng getting started : Sample "Custom Text Parser" config & files ?

 

Hi Martin,

If you're creating a text parser, you can paste your input text (or just a few sample lines) in the "Preview input" text box.
Then you will see if your lines are parsed properly (you want your important text to be green -- see the preview legend).
Make sure you create 'groups' under each regular _expression_ to capture the data and specify which field it corresponds to.
When you press "Next" you should see a preview table of how the trace would look like with this parser and this preview text.

And yes you can export, import and share the parsers, but you first have to find the well-hidden "Manage Custom Parsers" dialog:

http://wiki.eclipse.org/Linux_Tools_Project/LTTng2/User_Guide#Managing_custom_parsers

Patrick

On Tue, Nov 20, 2012 at 11:28 AM, Oberhuber, Martin <Martin.Oberhuber@xxxxxxxxxxxxx> wrote:

Hi all,

 

Thanks for the feedback on custom traces – I do have another request:

 

I found the idea of custom text parsers interesting, tried to create my own one but the imported data seems empty.

http://wiki.eclipse.org/Linux_Tools_Project/LTTng2/User_Guide#Custom_Parser

 

Does somebody have a sample text file (maybe one you’ve used for testing) ?

Is there a way to import / export the related text parser definition and share in a team ?

 

Thanks,

Martin

--

Martin Oberhuber, SMTS / Product Architect – Development Tools, Wind River

direct +43.662.457915.85  fax +43.662.457915.6

 


_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

 


_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

 


Back to the top