Questions tagged [systemtap]

Systemtap is tool to probe or trace a running linux system, supporting visibility into both kernel- (its initial focus) and user-space. It uses dynamically loaded probes to gather performance and tracing data about the whole system or just selected processes.

142 questions
4
votes
2 answers

Systemtap error on ubuntu

after install systemtap on ubuntu,test example hello-stap.stp。but there are some errors。 how can I fix this? thanks systemtap version Systemtap translator/driver (version 2.9/0.165, Debian version 2.9-2ubuntu2 (xenial)) Copyright (C) 2005-2015 Red…
4
votes
1 answer

Why does the kretprobe of the _do_fork() only return once?

When I write a small script with fork, the syscall returns twice processes (once per process): #include #include int main(int argc, char *argv[]) { int pid = fork(); if (pid == 0) { // child } else if (pid…
Georg Schölly
  • 124,188
  • 49
  • 220
  • 267
4
votes
1 answer

What is the role of undefined exception handler (__und_svc) in kprobes?

I tried to convert the kprobe as loadable kernel module. I am able to run the samples available in samples/kprobes/ folder from kernel tree. If we configure kprobes in kernel(CONFIG_KPROBES), then svc_entry macro will be expanded with 64 bytes in…
Jeyaram
  • 9,158
  • 7
  • 41
  • 63
4
votes
5 answers

Checking Linux Kernel Debugging option

How can I know if the standard kernel provided in my linux flavour has got DEBUG KERNEL ENABLED flags selected or not ?? I think DEBUG option should be enabled inorder to use tools like kprobe, systemtap ??
codingfreak
  • 4,467
  • 11
  • 48
  • 60
4
votes
2 answers

Is it possible to use systemtap 1.7/2.1 on Ubuntu 12.04 with 3.5.0/3.8.0 kernels?

My goal is to get an ability to use userspace probes on Ubuntu 12.04/precise host. This is possible starting from 3.5.0 kernel, so I installed the following…
Andrei Belov
  • 1,131
  • 9
  • 8
4
votes
3 answers

See socket options on existing sockets created by other apps?

I'd like to test whether particular socket options have been set on an existing socket. Ie, pretty much everything you can see in: #!/usr/bin/env python '''See possible TCP socket options''' import socket sockettypelist = [x for x in dir(socket)…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
3
votes
1 answer

Overloaded c++ methods profiling using SystemTap

How can I differentiate between overloaded methods using SystemTap probes? E.g. class A { // ... void doFoo(); void doFoo(int a); // ... }; In a .stp file: probe process("foobar").function("A::doFoo").return { // do something } probe…
milton
  • 988
  • 6
  • 19
3
votes
1 answer

utrace patch for linux kernel

I am currently working on a firewall with linux kernel. I want to extract the user space application information by using the utrace feature. I am able to probe event of the kernel space but not of the user space. It is saying that CONFIG_UTRACE not…
pradeepchhetri
  • 2,899
  • 6
  • 28
  • 50
3
votes
1 answer

Running SystemTap inside an unprivileged docker container

Is it possible to run SystemTap inside a docker container that is not privileged? I have mounted /lib/modules and /sys/kern/debug inside the container, and granted the container all capabilities, but that didn't help. While SystemTap does install…
MEE
  • 2,114
  • 17
  • 21
3
votes
2 answers

Repeated Minor Pagefaults at Same Address After Calling mlockall()

The Problem In the course of attempting to reduce/eliminate the occurrence of minor pagefaults in an application, I discovered a confusing phenomenon; namely, I am repeatedly triggering minor pagefaults for writes to the same address, even though I…
Tom
  • 433
  • 3
  • 9
3
votes
1 answer

In systemtap, how do I trap the return of a function in a user space process?

The following systemtap script fails to compile: probe process("myexe").function("myFun").return { print("hi mom\n") } It says: semantic error: while resolving probe point: identifier 'process' at proxy.stp:6:7 source: probe…
Martin C. Martin
  • 3,565
  • 3
  • 29
  • 36
3
votes
1 answer

User space probing with systemtap

Well I am trying to probe my own application on the SDT markers. I wrote a systemtap script to probe on it but systemtap shows no errors till pass 5 and then after pass 5 (starting run), it just goes on doing nothing. Here is my C program with SDT…
Hemant Kumar
  • 87
  • 1
  • 7
2
votes
2 answers

Systemtap for production server

I want to use systemtap for extracting details of my linux production server from remote access. I have some of the doubts regarding this: Whether is it necessary to have same kernel in both the linux production server and linux development…
pradeepchhetri
  • 2,899
  • 6
  • 28
  • 50
2
votes
2 answers

How to get a parameter of a kernel function and cast void pointer to char in SystemTap?

I have a system tap script that probes the kernel function "memcpy". I want to print the stack trace based on the content of the src buffer which is a void pointer. My code: %{ #include %} probe begin { …
Shubham Pendharkar
  • 310
  • 1
  • 4
  • 17
2
votes
1 answer

Difference between .function() and .function().call in systemtap

I am learning system tap utility to debug Linux Kernel. Here is the sample code: probe module("e1000").function("e1000_get*") { printf("%s\n", ppfunc()) } probe module("e1000").function("e1000_get*").return { printf("%s \n", ppfunc()) } What is…
md.jamal
  • 4,067
  • 8
  • 45
  • 108
1
2
3
9 10