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]

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.


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