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]

Re: [RFC] Framework for easy distribution of SystemTap scripts.


On 02/03/2010 01:57 AM, Frank Ch. Eigler wrote:

anithra wrote:


Options:
* --install -i Install the tapset rpm.
* --run -r Runs the scripts
for n minutes where n can be passed as a parameter. o The default value
is 10 minutes. Post processing is performed after the script completes.
* --start -s Invokes the script as a background process.
* --stop -x Stops the script and performs post processing.
* --uninstall -u Stops the script if running and uninstalls the rpm.
* --all Installs the rpm, runs the scrip, processes the output and
uninstalls the rpm.
* --help Displays this usage text.

It seems odd to have the file created by the framework-script to both manage installation as well as execution of the compiled systemtap materials. Why install if it can be run directly? If installed, how else to execute the systemtap module except via this file?

Perhaps the stap-buildrpm widget should create a plain rpm that is
self-explanatory to install, within which a /usr/bin/FOO shell script
manage the execution of the script.

It may be nice if stap-buildrpm interfaced with stap-initscripts, so
that rpms produced this way were easily activatable from that scheme.


- FChE

A little background on this framework might be of help in understanding the design goals for it. The idea was to build small diagnostic utilities based on systemtap that could be deployed on external systems (which may or may not have systemtap and dependencies like debuginfo installed). These could be used to glean specific information about the system.


Systemtap-generated kernel modules, along with systemtap runtime looked like a good mechanism to distribute such utilities.

We decided to package the precompiled kernel modules along with systemtap runtime binaries in an rpm. Also, we thought that the rpm installation ; systemtap module insertion, and data filtering and logging ought to be transparent to the support admin who is running this -- so we packaged the rpm alongwith a wrapper shell script that automates all these steps for the user. This was bundled in a self-extracting archive for simplicity of use.

This framework can be employed to build such diagnostic utilities on the fly.

The 'install' option in the shell script merely installs the rpm, ie, it copies the systemtap kernel module and runtime in a specified location. The 'uninstall' option removes systemtap kernel module and other files installed by the rpm. The 'run' option launches staprun to insert the systemtap generated kernel module, employs an optional post-processing script to filter the data logged, stores logs in a pre-specifed log file, and causes the systemtap kernel module to be clean-removed. The 'all' option does all these steps in order.

Interfacing with initscripts is a good add-on, but the primary purpose was to deploy such diagnostics on installations that lack systemtap and dependencies -- it was meant to be self-sufficient.

The framework can be enhanced if it is found useful to begin with :-)

Regards,
--
Prerna Saxena
 as possible
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India


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