This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [EXTERNAL] Re: Help
Bendel,
Thanks for responding. I installed the 'systemtap' package via yum, but it wasn't working, so I built from source
to get a more up-to-date version (3.1 -> 3.3). The problem I'm having is that systemtap can't find my kernel's
debug symbols. Here's some relevant information:
$ stap --version
Systemtap translator/driver (version 3.3/0.168, non-git sources)
Copyright (C) 2005-2018 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.18 ... 4.18-rc0
enabled features: BPF JAVA PYTHON2 PYTHON3 LIBRPM LIBVIRT LIBXML2 NLS
$ screenfetch
[X]
$ yum list installed | grep kernel
kernel-debug.x86_64 3.10.0-693.21.1.el7 @centos-base
kernel-devel.x86_64 3.10.0-693.21.1.el7 @centos-base/7.4.1708
kernel-lt.x86_64 4.9.67-1.el7.centos @cdn-Addons
kernel-lt.x86_64 4.9.70-1.el7.centos installed
kernel-lt-debuginfo.x86_64 4.9.70-1.el7.centos installed
kernel-lt-devel.x86_64 4.9.70-1.el7.centos installed
kernel-lt-headers.x86_64 4.9.70-1.el7.centos installed
kernel-lt-tools.x86_64 4.9.70-1.el7.centos installed
kernel-lt-tools-libs.x86_64
kernel-lt-tools-libs-devel.x86_64
$ repoquery -l kernel-lt-debuginfo
29407
$ repoquery -l kernel-lt-debuginfo | cut -d '/' --fields=1,2,3,4,5 | sort | uniq
/usr/lib/debug
/usr/lib/debug/.build-id
/usr/lib/debug/.dwz
/usr/lib/debug/lib
/usr/lib/debug/usr
/usr/src/debug/kernel-lt-4.9.70
$ sudo stap -e 'probe vfs.read { exit(); }'
semantic error: while resolving probe point: identifier 'kernel' at /usr/local/share/systemtap/tapset/linux/vfs.stp:962:18
source: probe vfs.read = kernel.function("vfs_read")
^
semantic error: missing x86_64 kernel/module debuginfo [man warning::debuginfo] under '/lib/modules/4.9.70-1.el7.centos.x86_64/build'
semantic error: while resolving probe point: identifier 'vfs' at <input>:1:7
source: probe vfs.read { exit(); }
^
semantic error: no match
Pass 2: analysis failed. [man error::pass2]
________________________________
From: Vratislav Bendel <vbendel@redhat.com>
Sent: Thursday, June 14, 2018 8:03 AM
To: Fieck, Brennan
Cc: systemtap@sourceware.org
Subject: [EXTERNAL] Re: Help
Hello Fieck,
Firstly you need to install the systemtap package via package manager
(depending on what linux-distro you have the command would be for example 'yum' or 'dnf' or 'apt-get' ...)
Then the basics are pretty easy. I'd recommend you to read through the Tutorial available at sourceware.org<http://sourceware.org>
and try out some of the simple scripts described there (At least that's how I started learning how to use it :) ).
The tutorial:
https://sourceware.org/systemtap/tutorial.pdf<https://sourceware.org/systemtap/tutorial.pdf>
Additionally, systemtap is very well documented in it's "man-pages"
and also in other documents at https://sourceware.org/systemtap/documentation.html
Also note that there might be additional packages you'd need to install like 'kernel-devel' and 'kernel-debuginfo',
however systemtap itself will tell you exactly when you run it.
I hope this will be helpful to you.
Best regards,
Vratislav Bendel