Question

according to https://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html#preppingxcompile, we can follow the following steps to generate instrumentation for other computes.

*1. Install the systemtap-runtime RPM on each target system.

  1. Determine the kernel running on each target system by running uname -r on each target system.

  2. Install SystemTap on the host system. You will be building the instrumentation module for the target systems on the host system. For instructions on how to install SystemTap, refer to Section 2.1.1, “Installing SystemTap”.

  3. Using the target kernel version determined earlier, install the target kernel and related RPMs on the host system by the method described in Section 2.1.2, “Installing Required Kernel Information RPMs”. If multiple target systems use different target kernels, you will need to repeat this step for each different kernel used on the target systems.*

**My question are

  1. how to install mulit versions of kernel-devel in ONE host system?
  2. I tried to uninstall kernel-devel,kernel-debuginfo,kernel-debuginfo-common, and install a new set of them for target host, (target host and this host have different version), and then I found to run "stap --remote xxx" also needs a same kernel version. How can I make life easy? shall I re-install kernel to match target host's kernel version? **

$ sudo rpm -ivh download/kernel-devel-2.6.32-220.el6.x86_64.rpm

[sudo] password for zhifan:

warning: download/kernel-devel-2.6.32-220.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%]

    package kernel-devel-2.6.32-279.el6.x86_64 (which is newer than kernel-devel-2.6.32-220.el6.x86_64) is already installed
Was it helpful?

Solution

You may simply need to use

rpm -i --force kernel-devel-FOOBAR

for each FOOBAR. Note though that rhel/rpms sometimes have unintentional conflicts that prohibit concurrent installation; see e.g. https://bugzilla.redhat.com/show_bug.cgi?id=901635 .

You might find it useful to install a small number of VMs on the local network, each running a different kernel version/arch to cover your desired targets, and activate avahi and the systemtap compile-server ("stap-server"). Then, after a little more one-time setup,

stap --use-server --remote=FOOBAR --remote=OTHERFOOBAR -e 'script'

should work automagically. See

man stap-server
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top