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]

help: can "staprun" support command-line arguments?


when users run a SystemTap script, SystemTap builds a kernel module out of
that script. However, systemTap scripts can only be run on systems where
Systemtap is deployed. In my cases, corporate policy prohibit installing
RPMs that provide compilers and debug information on develop machines. so I
try cross-instrumentation.? build module from my own computer then used on
develop machines.
but I have a problem .
systemtap script can use command-line arguments, but when I use
cross-instrumentation build module, I have a problem. I? hope I can input
command-line arguments to? the module which I build out of script in my own
computer. but it is failed...
e.g.
??? [script]
??? #cat commandlineargs.stp
??? probe kernel.function("vfs_read")
??? {
??????? fn = @1
??? printf("do function %s\n", fn)
??? }

if I do
stap -vv commandlineargs.stp vfs_read
it will be successful

but when I want build module, it is failed
command: stap -p 4 -r `uname -r` commandlineargs.stp -m commandlineargs
(could not add command-line args, because I want input at develop machine)
??? #stap -v -p 4 -r 2.6.33.5-124.fc13.i686 commandlineargs.stp -m
commandlineargs
??? parse error: unknown token '@1' at commandlineargs.stp:3:17
??? source:??? fn = @1
??????????????? ^

I think command line args will be a module_param, but it seem not... so, who
can tell me, how to do it, I just want on my develop machine can support
input cammand-line args...

I'm so sorry, my english is poor. I hope you can understand what I say...


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