This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: udp.sendmsg
- From: <webman at manfbraun dot de>
- To: "'David Smith'" <dsmith at redhat dot com>, "'Frank Ch. Eigler'" <fche at redhat dot com>
- Cc: <systemtap at sourceware dot org>
- Date: Sat, 3 Sep 2016 16:31:05 +0200
- Subject: RE: udp.sendmsg
- Authentication-results: sourceware.org; auth=none
- References: <!&!AAAAAAAAAAAYAAAAAAAAAOosgHnoPqdNlUO2DUrQ/DfCgAAAEAAAALIQ9N06hUJCikHNx7UT8tIBAAAAAA==@manfbraun.de> <y0mr3apofks.fsf@fche.csb> <!&!AAAAAAAAAAAYAAAAAAAAAOosgHnoPqdNlUO2DUrQ/DfCgAAAEAAAAO9TVsiSQVFNrYX90c/fiBQBAAAAAA==@manfbraun.de> <c4690df4-6465-e504-d2f5-4c8fecb4ba61@redhat.com> <!&!AAAAAAAAAAAYAAAAAAAAAOosgHnoPqdNlUO2DUrQ/DfCgAAAEAAAALedYE8qwt9NnQcEwtaCu08BAAAAAA==@manfbraun.de> <f0b3fbe9-1100-c7d6-35b7-9b92157f6202@redhat.com>
Hello !
Thanks for this good information!
I just removed this code snippet and only use "execname()"
and the error went away!
I am new to Linux and it is really very hard for me ;-)
But I was able to use SystemTap to track some Virtualbox
calls, just to show them, what brings to whole server
to stop (!!) - but they are not interested .... and now,
I am trying to avoid Virtualbox like the devil the
holy water ;-)
So, this is the same machine and was my new delay ....
Best regards,
Manfred
BTW: I am of that type, that will not use "--skip-badvars",
at least, in a permanent running script ;-)
> -----Original Message-----
> From: systemtap-owner@sourceware.org [mailto:systemtap-
> owner@sourceware.org] On Behalf Of David Smith
> Sent: Thursday, August 25, 2016 9:52 PM
> To: webman@manfbraun.de; 'Frank Ch. Eigler'
> Cc: systemtap@sourceware.org
> Subject: Re: udp.sendmsg
>
> On 08/25/2016 11:18 AM, webman@manfbraun.de wrote:
> > Hello !
> >
> > Many thanks for your answer!
> > Sometimes, writing "it's not working" reactivates some areas
> > in the own brain, do dig deeper ...
> > What ist failing for me, is my modified version of the original
> > script. I run the original and no errors at all ... ;-)
> >
> > So, here is MY version - with my little newbies thinking about
> > this type of scripts ;-)
> >
> > =======================
> > probe begin { printf("Monitoring use of port 53\n") }
> > probe end { printf("Stopped.\n") }
> >
> > probe udp.sendmsg {
> > if ( dport == 53 ) {
> > task = pid2task(pid());
> > printf(
> > "UDP53 %5d.%6d %15s %d(%s/%s) %d(%s)\n",
> > gettimeofday_s(),
> > gettimeofday_ms(),
> > daddr,
> > pid(),
> > task_execname(task),
> > execname(),
> > ppid(),
> > pexecname()
> > )
> > }
> > }
>
> OK, here's a couple of things about your script.
>
> task = pid2task(pid())
>
> is the same thing as:
>
> task = task_current()
>
> Plus, since task is the current task, task_execname(task) and execname()
> are always going to return the same string.
>
> So, at that point you really don't need your 'task' variable.
>
> If you are still getting that kernel_string copy fault error, you'll
> need to delete/replace one function call at a time so that we can narrow
> down which function is causing the fault.
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)