This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
pid and execname mismatches
- From: tonyg362 <tonyg3622 at yahoo dot com>
- To: systemtap at sourceware dot org
- Date: Thu, 22 Jul 2010 07:29:43 -0700 (PDT)
- Subject: pid and execname mismatches
I'm trying to collect the pids and execnames of every process when it enters
the scheduler. The problem is that it seems as though the pid of the process
I use for the -c option always gives me the execname of the stapio process.
I thought maybe there was a problem with looking at the incorrect
task_struct because I am inside the scheduler, so I got this info directly
from the prev task_struct using context variables. e.g.
global pidlist
probe kernel.statement("schedule@kernel/sched.c:line#") {
ppid = $prev->tgid
name = kernel_string($prev->comm)
if (!([ppid] in pidlist))
pidlist[ppid] = name
}
probe end {
foreach ([pid] in pidlist)
printf("%d:%s\n", pid, pidlist[pid])
}
However, if I just hook into system calls and do a similar thing the pids
and execnames match up correctly. Am I doing something wrong?
--
View this message in context: http://old.nabble.com/pid-and-execname-mismatches-tp29237551p29237551.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.