newer kernel+systemtap & nfs.fop.open
David Smith
dsmith@redhat.com
Fri Apr 1 14:05:42 GMT 2022
Daire,
I'll take a stab at answering this. First off, note that systemtap hasn't
changed in this area, the underlying kernel has. That said, I might try
this (completely untested):
stap -e 'probe nfs.fop.open { filename =
fullpath_struct_file(task_current(), $filp); printf("filename: %s\n",
filename)}'
On Fri, Apr 1, 2022 at 8:27 AM Daire Byrne via Systemtap <
systemtap@sourceware.org> wrote:
> Hi,
>
> Is anyone able to point me in the right direction or is there a better
> forum for asking these kinds of questions?
>
> Cheers,
>
> Daire
>
> On Thu, 10 Mar 2022 at 19:58, Daire Byrne <daire@dneg.com> wrote:
>
> > Hi,
> >
> > Bit of a newbie question, but I'm trying to port some older code to a
> > newer version of systemtap (4.7pre) and I'm seeing a change in
> > behaviour in the output of this:
> >
> > stap -e 'probe nfs.fop.open { filename = sprintf("%s",
> > d_path(&$filp->f_path)); printf("filename: %s\n", filename)}'
> >
> > On previous versions (RHEL7, stap v4.1), the resulting filename had
> > the full path including the mounted directory path or autompunt path,
> > But on newer version of the kernel and systemtap, it seems like only
> > the file path after the NFS mountpoint is being printed.
> >
> > Is there some other trick now required with the
> > d_path((&$filp->f_path)) to include the NFS mountpoint location and
> > provide the full path?
> >
> > Many thanks,
> >
> > Daire
> >
>
>
--
David Smith
Manager
Red Hat <https://www.redhat.com/>
<https://www.redhat.com/>
More information about the Systemtap
mailing list