This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Queries on SystemTap - with focus on User Space debugging


Hi,
I introduce myself as a beginner in SystemTap and would appreciate if someone
could provide answers to my queries related to this tool.

I was trying to implement something similar to the tool DTrace ( which
works on Solaris platform ) in Linux, and found that SystemTap provides
DTrace like functionality in Linux.

Here are some of the clarifications which I need:

 - Is SystemTap as good as DTrace in tracing/debugging userspace
applications?

- Does userspace probing in systemtap work exactly the same way as DTrace?
( My kernel supports UTrace)
  If not, in what ways do they differ?

- Can 'pstack' or any such tracing/profiling commands be invoked within a
SystemTap session which collects the corresponding user space data when
the process hits a particular probe.

For example, I tried the following script to collect stack trace of a
particular process.

probe process("process_name").syscall
{
        pid = pid()
        if (pid == target())
        {
                if ($syscall == 11)
                {
                stop_cmd = sprintf("kill -s STOP %d", pid)
                system(stop_cmd)                                       //
Trying to stop the process to collect the required data when it receives
SIGSEGV

                        cms = sprintf("pstack %d", pid())
                        system(cmd)
                        }
                        cont_cmd = sprintf ("kill -s CONT %d", pid)
                system(cont_cmd)
             }
}

Output:
Process 6343 not found  // output of pstack
sh: line 0: kill: (6343) - No such process
sh: line 0: kill: (6343) - No such process

Here bash commands executed through 'system' tapset are invoked after the
process is dead.

My intent to get the userspace backtrace of any process which exits with a
segmentation fault.  Is such a generic tracing method available in
systemtap?
Iam using Linux Red Hat release 5.4  and please comment on the backward
compatibility of the tool with Red Hat release 4.7.

Thank you,
Manjusha Ajay.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]