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]

Fwd: staprun-only system


Here's email from Mike Anderson, an IBMer who has been using SystemTap
for some time.  As indicated, the staprun-only build is not working for
him as desired, and he has taken considerable pains to work around the
failures he sees.

I'm forwarding this with his permission in hopes that someone can give
him some guidance.

Thanks.
Jim
-------- Forwarded Message --------
From: Mike Anderson <andmike@linux.vnet.ibm.com>
To: jkenisto@linux.vnet.ibm.com
Subject: Re: staprun-only system
Date: Fri, 17 Apr 2009 13:50:20 -0700

jkenisto@linux.vnet.ibm.com wrote:
>    Hi, Mike.  We talked about your desire for a stripped-down staprun-only
>    build.  This is supposed to be supported.  The simplest approach,
>    according to Frank Eigler, is to do:
>    $ ./configure     # Ignore messages about missing components.
>    $ make staprun
> 
>    I haven't tried this.
> 
>    There's also documentation about this in Section 2.2 in the SystemTap
>    Beginner's Guide (see
>    [1]http://sourceware.org/systemtap/documentation.html).
> 

Thanks for the email.

The -g (guru) mode solved my blacklist issue.
"... guru mode enabled - ignoring blacklist ..."

On the stripped down staprun for the target system here is what I
observed using the current systemtap git tree (systemtap-0.9.5-25620).

In the "SystemTap Beginner's Guide" section 2.2 the target system setup
uses systemtap-runtime not the configure / build steps (which makes sense
for a beginner's guide). In my test cases this prebuilt runtime will not
always work.

1.) In early distro bring up sometimes the systemtap-runtime is not
available or the distro we are testing does not provide it.

2.) In some cases I want to run the latest systemtap version for the git
tree. In the future I assume this need will be reduced.

I tried the ./configure on the target system and it did not generate a
Makefile as the elfutils where not installed, I could install them, but
since staprun does not need them I wanted to simplify my target system
default install by not requiring extra rpms for debug. 

I hacked the configure script to allow a Makefile to be created. I was
then able to do a make staprun, but I could not do a make install just for
staprun. To run staprun in wants stapio in the prefix location. I can
leave the --prefix off my configure operation, which generates a not
supported message from configure but still I receive the
"/usr/local/libexec/systemtap/stapio: No such file or directory" message.

Since make install did not work. I copied the files by hand. I am still
cleaning up a issue where staprun will not load the previously built
scsi_test systemtap module.
"# staprun ./scsi_test.ko
ERROR: scsi_test: inconsistent scsi_mod build-id byte #0 (0x6e [actual]
vs. 0x83 [debuginfo])"

In essence what I was looking for is close to working, but my point
was that it would be nice if a few things where cleaned up to eliminate
the workarounds to make a cleaner build / install staprun only process
that I think a number of developers would use.

Here is my current process.

#On the Build system.
1.) Pull latest systemtap git tree.
2.) Generate tar file from git tree # Not needed for build system, but keeps target and build in sync.
3.) Untar systemtap tar file to a directory on the build system.
4.) ./configure  --prefix=/home/andmike/systemtap-0.9.5-25620 --disable-server --disable-refdocs --disable-docs --disable-sqlite
5.) make; make install
6.) Add /home/andmike/systemtap-0.9.5-25620/bin to path
7.) stap -g -r ${BUILD_TREE} -m scsi_test scsi_test.stp
/lib/modules/2.6.30-rc1-v2.6.30-rc1-dirty/systemtap/scsi_test.ko':
8.) rsync scsi_test.ko module to target system.

# On Target system.
1.) Untar systemtap tar file to a directory on the target system.
2.) Install libdw-devel-0.137-8.19.x86_64.rpm libebl-devel-0.137-8.19.x86_64.rpm libelf-devel-0.137-8.19.x86_64.rpm
or
2.) Hack configure script for the elfutils checks.
3.) ./configure  --prefix=/root/systemtap-0.9.5-25620 --disable-server --disable-refdocs --disable-docs --disable-sqlite
5.) make staprun stapio
6.) Hack the install to /root/systemtap-0.9.5-25620 so staprun will work.
	- mkdir -p ~/systemtap-0.9.5-25620/libexec/systemtap
	- mkdir -p ~/systemtap-0.9.5-25620/bin
	- cp staprun ~/systemtap-0.9.5-25620/bin
	- cp stapio ~/systemtap-0.9.5-25620/libexec/systemtap
4.) ./staprun ~/scsi_test.ko

-andmike
--
Michael Anderson
andmike@linux.vnet.ibm.com


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