This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: stap and staprun use cases
- From: David Smith <dsmith at redhat dot com>
- To: Martin Hunt <hunt at redhat dot com>
- Cc: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Tue, 24 Jul 2007 12:54:36 -0500
- Subject: Re: stap and staprun use cases
- References: <1185298324.3785.29.camel@dragon>
Martin Hunt wrote:
With the changes we are working on to split users into two groups, it is
a good time to consider how those two groups will use stap and staprun.
With this in mind, we can make the necessary tweaks to the user
interface.
1. stapdev
1A. Compile and Run a script. Same as now.
stap script
1B. Just compile a script. When doing this it will always be desirable
to give it a meaningful name.
Now.
stap -p4 -km name
cp /tmp/stapXXXX/name.ko [destination]
rm -rf /tmp/stapXXX
Proposed.
stap -m name
name.ko is put in the current directory. Module is lot loaded.
With the proposed syntax, you can't name a module and run it in one
command, as you can now ("stap -m name foo.stp").
Note that you are describing bug #4295, which grew out of #4281. See
the latter for a long discussion on this issue. If I remember
correctly, we could never come to consensus on this issue.
1C. Compile and install a script so stapusr users may use it.
Now.
stap -p4 -km name
cp /tmp/stapXXXX/name.ko /lib/modules/`uname -r`/systemtap
rm -rf /tmp/stapXXX
Proposed. add "-i" option for install. Change "-m" to put module in
current directory and not load it.
stap -im name
Unless the /lib/modules/`uname -r`/systemtap directory is writable by
the stapdev group, this will fail.
1D. Load and run a module.
From /lib/modules/`uname -r`/systemtap:
staprun module[.ko]
From anywhere:
staprun /path/to/module[.ko]
I believe that currently the '.ko' is required.
2. stapusr
2A. Compile and Run a script. Not allowed.
Proposed:
stap should reject attempts to compile script unless
"-m" or "-pX" where X < 5. This is optional. staprun
will not load the script
2B. Just compile a script. Same as 1B. All (not just stapusr) users may
compile scripts. Justification: Allows users to check that scripts
compile. Allows them to then use su or sudo and install the module in
the case where they are not, for some reason, in stapdev.
If they have root access (either through su or sudo) they don't need to
install the module to run it - "sudo stap foo.stp" should work correctly.
2C. Compile and install a script so stapusr users may use it.
Proposed: Not allowed. stapdev and root users only.
2D. Load and run a module.
From /lib/modules/`uname -r`/systemtap:
staprun module[.ko]
From anywhere: Not allowed.
I'm thinking of allowing the above case, by looking in
/lib/modules/`uname -r`/systemtap for module.ko. I'm trying to figure
out the best way to implement it.
staprun /path/to/module[.ko]
If /path/to != "/lib/modules/`uname -r`/systemtap"
then print error message.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)