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
23
votes
2 answers

How can I set breakpoint in GDB for open(2) syscall returning -1

OS: GNU/Linux Distro: OpenSuSe 13.1 Arch: x86-64 GDB version: 7.6.50.20130731-cvs Program language: mostly C with minor bits of assembly Imagine that I've got rather big program that sometimes fails to open a file. Is it possible to set breakpoint…
Alex Z
  • 233
  • 1
  • 2
  • 8
9
votes
3 answers

Profiling for wall-time on Linux

I have an application that I want to profile wrt how much time is spent in various activities. Since this application is I/O intensive, I want to get a report that will summarize how much time is spent in every library/system call (wall time). I've…
sandt1g3r
  • 143
  • 1
  • 6
8
votes
1 answer

SystemTap seems to give unrelevant output

My system is Ubuntu, uname -r = 4.15.0-23-generic. I've installed debug symbols for a kernel. My problem is: I am trying to use socket(AF_PACKET, SOCK_DGRAM, 0) for transmision purpose. For sendto(fd, 0,0,0,0,0) syscall I've got EINVAL …
Gilgamesz
  • 4,727
  • 3
  • 28
  • 63
7
votes
1 answer

Linux run kernel probe systemtap script failed with semantic error: no match"

I've got 2 experimental environment: CentOS 6.8 and Ubuntu 16.04 Both run inside Virtualbox VM. On CentOS I installed yum install kernel-devel kernel-debug On Ubuntu I installed: sudo apt-get install linux-headers-$(uname -r) sudo apt-get install…
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
6
votes
7 answers

How do I benchmark or trace a specific function in the Linux Kernel?

How do I use ftrace() (or anything else) to trace a specific, user-defined function in the Linux kernel? I'm trying to create and run some microbenchmarks, so I'd like to have the time it takes certain functions to run. I've read through (at least…
Ricky Mutschlechner
  • 4,291
  • 2
  • 31
  • 36
6
votes
2 answers

Log memory accesses that cause major page faults

Does anyone know how to get the memory accesses (pointers) that cause page faults? I'm interested mostly in the major page faults. A bit of background about what I'm trying to achieve. I have an application with a large memory footprint (a database)…
pol lol
  • 281
  • 1
  • 2
  • 5
6
votes
2 answers

Systemtap PPC32 support

Does Systemtap have PPC32 support ? I see it is mentioned it is supported in Intel and PPC64 platforms but there is not much information about PPC32. Also, can SystemTap used to debug customized loadable kernel modules ? Thanks, Sethu
Sethu
  • 556
  • 1
  • 7
  • 18
5
votes
1 answer

Determine syscalls or subsystems a process is spending time waiting in

I'm looking for ways to learn which syscalls or which subsystems a process or thread spends time waiting in, i.e. blocked and not scheduled to run on a CPU. Specifically if I have some unknown process, or a process where all we know is "it's slow"…
Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
5
votes
0 answers

dtrace and linux perf tools not working in ubuntu

I have a node.js application running on a aws ubuntu instance. I was trying to generate flamegraphs using dtrace and linux perf tools but none of them seem working. these are steps I am following : linux perf tools:…
user6348718
  • 1,355
  • 5
  • 21
  • 28
5
votes
1 answer

why does copy_to_user spend several hundreds of milliseconds?

I have some linux servers running apache trafficserver and have found about 1/20's requests take several milliseconds which is much longer than expected(should be 1-2ms). After tracing by systemtap, I'v found the time is spent in linux kernel…
5
votes
1 answer

How to inspect the variables of user space functions in systemtap?

I met a problem when inspecting the local variables of user space application in systemtap. I write a test.c like this: #include int func(int *p, int val) { printf("p=%p val=%d\n", p, val); return 1; } int main() { …
5
votes
1 answer

Can a process be stopped via a systemtap probe so gdb can be attached?

We have a multi-process application where debugging a specific child process is proving difficult. Due to messaging timeouts between the processes we don't have time to attach gdb to the target child, so I was wondering if I can stop a process via…
mrtimdog
  • 487
  • 4
  • 13
5
votes
2 answers

How to list current active systemtap probes

Could anyone please tell me how to list current active systemtap probes in the system? I guess there might be some infomation from the "/proc".
brian
  • 265
  • 1
  • 9
5
votes
1 answer

Systemtap effect on performance

I'm looking for some real information about the effect of systemtap on performance. I know that static kernel probes are documented somewhere on their website (with stats), but what about userspace probes? I saw this post on their mailing list…
viraptor
  • 33,322
  • 10
  • 107
  • 191
4
votes
0 answers

Using ftrace to see kernel function arguments

I have had a ton of problems with SystemTap and am looking to test out ftrace. In specific, I am looking to monitor a function's arguments in real-time. I have read the ftrace documentation, but am having trouble piecing together the instructions to…
Farhan Yusufzai
  • 297
  • 6
  • 23
1
2 3
9 10