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: Simple script to grab and install the appropriate kernel RPMs


K.Prasad wrote:
On Mon, Nov 03, 2008 at 02:13:48PM -0500, William Cohen wrote:
Hi All,

In an effort to make it a bit easier to install systemtap on RHEL machines, I have made a small script to figure out which RPMs to install based either on the running kernel (no arguments to script) or the output of "uname -r" as an argument to the script. This script is only designed to work on RHEL. I would like to comments on it. The plan is to include this in the Systemtap beginners guide to make it easier for people to machine setup to run systemtap.


Just thinking if the script mitigates the problem seen with PAE and smp versions of the kernel, wherein uname -r would contain the string PAE and smp, and the kernel package's name isn't a simple 'kernel-debuginfo' but a 'kernel-PAE-debuginfo'.

Thanks,
K.Prasad


Hi Prasad,


The is a for loop that checks for "debug kdump PAE xen" variants in the script and adjusts the name accordingly. It should catch the cases you are talking about. Let me know if it doesn't.

I have also updated the script so it only prints out the needed packages when run by a normal user (normal user can't do rpm install so why even try?). When run by root it will attempt to download the packages and install them.

I have attached the revised version of the script to this email. The script is also checked into the git repository in the documentation section:

doc/SystemTap_Beginners_Guide/en-US /extras/stapprep.sh

-Will

Attachment: stapprep.sh
Description: Bourne shell script


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