[Example] Yet another remote systemtap compiler over ssh

Masami Hiramatsu mhiramat@redhat.com
Tue Jun 17 07:13:00 GMT 2008


Hi,

Here is a shell script which executes stap on remote machine to compile
scripts. This script uses ssh to execute stap and to get a binary
module. So, you don't need to setup server program; just install
systemtap and kernel-debuginfo(, gcc, kernel-devel, etc.) packages on
the remote machine.

Usage is also simple.
 stap-remote <[user@]host> [options] <file|-|-e 'script'|-l 'tracepoint'>
  options: same as stap.

ex.)
[root@local]# stap-remote mhiramat@remote -e 'probe syscall.read{println("hello");exit()}'

this means, what you just need to do is s/stap/stap-remote <host>/g :-).

Actually, this script doesn't care security so much (just use ssh),
because this script can not ensure whether remote stap is genuine or not,
neither check client program. So, before using this, please check
security of both remote server and local machine carefully:-).

In other words, this just automates
'scp -r ... host: ; ssh host stap ...; scp host:XXX.ko ./; staprun ... XXX.ko'


Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stap-remote
URL: <http://sourceware.org/pipermail/systemtap/attachments/20080617/c43fc7fd/attachment.ksh>


More information about the Systemtap mailing list