When I use stap, it tell me this error as the image,how can i fix it.
Asked
Active
Viewed 1,311 times
1
-
You could try to follow step from https://github.com/draios/sysdig/issues/637 There's some interesting points that maybe can help you. – Naremy Sep 06 '17 at 08:23
-
Sorry if this is obvious, but even if you get systemtap to build a module (complete pass 4), there's to way that the mac osx kernel will be able to run it. – fche Oct 19 '17 at 02:10
1 Answers
1
Really don't know why this question has been downvotted once. When i get concern, downvotter are one of the reason i always hesitate to ask thing on stackoverflow...
So, got the same concern with a container under ubuntu and it is how i fix it : try to launch an ubuntu bash on docker (not centos but the step should be similar)
docker run -it --cap-add sys_admin ubuntu bash
Then install some library and systemtap
apt-get update
apt-get --yes install build-essential cmake bc curl diffutils git kmod libcurl4-openssl-dev wget
apt-get --yes install systemtap systemtap-sdt-dev
Now install the kernel headers (will take time)
export KERNELVER=$(uname -r | cut -d '-' -f 1)
export KERNELDIR=/linux-$KERNELVER
cd /
curl -o linux-${KERNELVER}.tar.gz https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNELVER}.tar.gz
tar zxf linux-${KERNELVER}.tar.gz
cd linux-${KERNELVER}
zcat /proc/1/root/proc/config.gz > .config
make all
make modules_prepare
make headers_install
make modules_install
Now run stap -l 'syscall.*'
. It should work and display :
...
syscall.waitpid
syscall.write
syscall.writev
This is taken from : https://github.com/fdebonneval/mobydig/blob/master/resources/build

Naremy
- 491
- 8
- 22