public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
To: systemtap@sourceware.org
Subject: Re: [RFC] Framework for easy distribution of SystemTap scripts.
Date: Mon, 22 Mar 2010 20:48:00 -0000	[thread overview]
Message-ID: <4BA7D773.5050106@linux.vnet.ibm.com> (raw)
In-Reply-To: <4B685611.5090402@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 4859 bytes --]

Hi,

I've attached a modified framework that contains the following changes 
(as per comments received on IRC):
1. Config options need not be specified in a separate config file. All 
options are passed through the command line.
2. The stap-buildpkg script does not parse the kernel release/additional 
tapset directories options. Instead all 'additional' options are 
directly passed to the stap command.
3. The package now contains only 1 template file and README apart from 
the stap-buildpkg script itself.

The framework was tested on RHEL5.4(x86,x86_64,ppc64), 
SLES10(ppc64),F12(x86).

Please comment.

Regards,
Anithra.


On 02/02/2010 10:12 PM, Anithra P Janakiraman wrote:
> Hi,
>
> I've attached a modified framework. The names of the template/config
> files have been changed(no change in functionality). I've attempted to
> keeps the names compatible with other scripts in the SystemTap package.
> We would like to keep the framework in a seperate directory (similar to
> the initscript dir) for the sake of simplicity. (called
> distribution-framework or distribution-fw?)
>
> The directory would contain the following
> template.specfile
> template.install
> template.binextractor
> config.rpmoptions
> systemtap-rpm-generator (This is the executable script)
> README
>
>
> Let me know if any changes are needed (names of files/directory or
> contents). If there is any naming convention that i should adhere to
> please let me know. If there are no concerns, or suggestions i would
> like to go ahead and commit the framework.
>
> Thanks.
>
> Regards,
> Anithra
>
>
>
> On 12/09/2009 11:11 PM, Anithra P Janakiraman wrote:
>> Hi all,
>>
>> We've been looking at a simplified distribution framework for SystemTap
>> scripts that :
>> 1. packages a set of systemtap scripts and dependent
>> tapsets in a form that circumvents , as much as possible the need for
>> external dependencies(like kernel-debuginfo)
>> 2. installs, runs the script, post processes the output and uninstalls
>> out of the box
>>
>> We feel this would be especially useful in scenarios where support
>> admins wish to run a particular set of script(s) on a machine for debug
>> or monitoring purposes. I'm attaching an rpm-based framework that does
>> the following:
>> 1. Compiles a set of scripts into a set of kernel modules
>> on another machine of identical architecture that has SystemTap
>> installed and running
>> 2. Creates an rpm on the fly that would consist of
>> i) kernel modules ii) staprun & stapio taken from the systemtap-runtime
>> package in the machine that has SystemTap installed, iii) post
>> processing script to process the output(optional)
>> 3. Bundles the above
>> rpm with an install script that has options to i) install the rpm ii)
>> run / stop iii) uninstall iv) all of the above.
>> 4 . The rpm and the
>> install script are packaged into a self-extracting binary that would
>> extract itself and execute 1 of the four steps above.
>>
>> The framework would mainly consist of
>> 1. rpm-generating script
>> (rpm-generator.sh) that does all of the above
>> 2. spec file template that
>> will be modified by the rpm-generator on the fly and used to build the
>> rpm
>> 3. install script template that will be modified by the
>> rpm-generator and bundled with the rpm
>> 4. Configuration file - that
>> would specify the location of the scripts/tapsets
>>
>> The rpm is packaged as a self extracting binary for ease of use. When
>> the binary is executed it extracts the rpm package and based on the
>> parameters provided either installs/runs/uninstalls the rpm. Help
>> detailing the available options are also provided
>>
>> USAGE: <package_name> [options] [parameters]
>>
>> 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.
>>
>> Parameters:
>>
>> * time=[x] x is in minutes. Runs the script for x minutes. valid for
>> --run(-r) o --start(-s) or --all(-a) options only
>>
>>
>>
>> One disadvantage of the above framework is that the end binary that is
>> created is tied to a particular kernel version/architecture. However the
>> users now need not install systemtap, debuginfo and need not even be
>> familiar with SystemTap. This should help users and admins who wish to
>> run a set of scripts to solve a specific problem(maybe on a customer's
>> machine).
>>
>> Please comment,
>>
>> Regards,
>> Anithra.
>>
>>
>>
>>
>


[-- Attachment #2: framework.tgz --]
[-- Type: application/x-compressed-tar, Size: 3643 bytes --]

  parent reply	other threads:[~2010-03-22 20:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 18:00 Anithra P Janakiraman
2010-02-02 16:43 ` Anithra P Janakiraman
2010-02-02 20:28   ` Frank Ch. Eigler
2010-02-04  9:17     ` Prerna Saxena
2010-02-17 18:09   ` Anithra P Janakiraman
2010-02-28  9:58     ` Anithra P Janakiraman
2010-02-28 20:26       ` Ahmed Taha
2010-03-01  6:41         ` Anithra P Janakiraman
2010-03-22 20:48   ` Anithra P Janakiraman [this message]
2010-04-07  9:21     ` Anithra P Janakiraman
2010-04-08 15:47       ` Frank Ch. Eigler
2010-04-09 16:19         ` [RFC] Framework for easy distribution of SystemTap scripts (V2) Anithra P Janakiraman
2010-04-09 17:03           ` Frank Ch. Eigler
2010-04-13 17:17             ` [RFC] Framework for easy distribution of SystemTap scripts (V3) Anithra P Janakiraman
2010-04-13 20:56               ` Frank Ch. Eigler
2010-04-14 22:32                 ` [RFC] Framework for easy distribution of SystemTap scripts (V4) Anithra P Janakiraman
2010-04-14 22:32                   ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA7D773.5050106@linux.vnet.ibm.com \
    --to=anithra@linux.vnet.ibm.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).