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
1
vote
0 answers

SystemTap script compilation fails to recognize the kernel.xxx probes

I'm running SystemTap on ArchLinux 4.7.4-1, with the rebuilt kernel as instructed on ArchLinux Wiki. The version of SystemTap is: $ stap -V Systemtap translator/driver (version 3.0/0.167, non-git sources) Copyright (C) 2005-2015 Red Hat, Inc. and…
pjhades
  • 1,948
  • 2
  • 19
  • 34
1
vote
1 answer

How can I show double/float values using systemtap $$param$$ and $$return$$

I'm using systemtap to get a callgraph with parameters and return values, but float and double variables are shown as ? char. Is there a way to show the correct value? My systemtap script is this: #! /usr/bin/env stap probe $1.call { trace(1,…
William
  • 331
  • 1
  • 3
  • 12
1
vote
1 answer

How to do user-space probing using debug info in systemtap

I am new to systemtap and would like to understand how to attach instrumentation dynamically to a production application using debug information in the application. For a target application (example apache webserver). I would like to find the…
tsar2512
  • 2,826
  • 3
  • 33
  • 61
1
vote
1 answer

How to understand the pid() and new_pid are same value in executing forktracker.stp?

I am using forktracker.stp to track the fork process flow. The script is like this: probe kprocess.create { printf("%-25s: %s (%d) created %d\n", ctime(gettimeofday_s()), execname(), pid(), new_pid) } probe kprocess.exec { …
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
1
vote
1 answer

systemtap: how to determine probe events and args

I'm trying to find out the reason for these writes to my flash drive. deathstar> while true > do > dmesg|grep sdc|grep WRITE > sleep 3 > done [17967.580179] kworker/u4:2(6863): WRITE block 20971648 on sdc1 (8 sectors) [17967.580206]…
user621819
1
vote
1 answer

Why is systemtap not generating the output necessary for flamegraph creation?

When executing stap for the purposes of generating flamegraph data, why is my out.stap-stacks missing process data? OS: RHEL 5.10.0.2 Kernel: 2.6.18-371.11.1.el5 SystemTap: 1.8-6.el5 Packages…
1
vote
0 answers

systemtap: registration error (rc -84)

I have a systemtap script that finds the latency of some functions inside a kernel module. (discussed here: SystemTap script to profile latency of functions) It's working fine with a an older build version of my kernel module, but when I rebuilt…
1
vote
3 answers

Systemtap does't show all the local variables in a kernel function

I'm trying to debug some code in the kernel using systemtap. I need to print the value of local variables in that function but it looks like systemtap can only see the function arguments and not the local variables defined in that function. Here is…
syed
  • 173
  • 3
  • 10
1
vote
1 answer

systemtap global variable allocation failed

I want to use systemtap for extracting details of my linux production server. my systemtap script is global bt; global quit = 0 probe begin { printf("start profiling...\n") } probe timer.profile { if (pid() == target()) { if…
1
vote
1 answer

Getting pid of pages that are being swapped out

My goal is to find out process-id of pages which are being swapped out. The Linux Kernel function swap_writepage() takes a pointer to struct page as a part of formal argument while swapping a page on backing store. All swap-out operations are done…
1
vote
1 answer

SystemTap script strange behavior

I have simple ST script which counts process io size per file: global fds, counts probe syscall.open.return { if ( ( pid() == target() ) & ( $return != -1 ) ) { printf("%s opened as %d\n", user_string($filename), $return) …
1
vote
1 answer

Can we do a systemcall in a systemtap probe?

For example, given probe syscall.pwrite { } Can I do a pread in the probe of pwrite? Thanks! Erben
Erben Mo
  • 3,528
  • 3
  • 19
  • 32
1
vote
2 answers

kprobes not working in Ubuntu

I am trying to run one of the standard example scripts from Systemtap. The procmod_watcher.stp uses kprobes to watch fork, exec, etc. But when I try to Run this script I get an error. semantic error: while resolving probe point: identifier…
V.C.
  • 81
  • 8
1
vote
0 answers

systemtap remote debug user process with source code

I have a stripped version (without symbol table) of mongod running on machine A, it is a production server. On machine B I have the source code and a non-stripped mongod binary (with symbol table). I want to remote debug a production issue…
zhihuifan
  • 1,093
  • 2
  • 16
  • 30
1
vote
0 answers

Call graph of C++ program under Eclipse / Ubuntu 13.10 x64

I would like to draw the call graph of a C++ program under Eclipse / Ubuntu 13.10 x64. I have installed SystemTap and am able to launch the "initial testing" properly. But when I try to get the call graph of my program, I obtain: bad fd number if I…
Greg82
  • 1,000
  • 3
  • 10
  • 24