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.
Determine the kernel running on each target system by running uname -r on each target system.
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”.
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
$ 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
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