Systemtap

From OLPC
Revision as of 01:33, 1 December 2006 by 66.187.230.198 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Getting the Tools

Get the rpms from here:

http://olpc.download.redhat.com/kernel/RPMS/i586/

Install them.

Get a patched systemtap from here:

git clone git://dev.laptop.org/users/cjb/systemtap-olpc

Build it:

./configure --with-elfutils=./elfutils-0.123 make all sudo make install global indent function timestamp() { return sprint(gettimeofday_ms()) . indent[pid()] . " " } probe kernel.function("sys_open") { if ($flags & 1) { print(timestamp() . execname() . " writes " . user_string($filename) . "\n") } else { print(timestamp() . execname() . " reads " . user_string($filename) . "\n") } }

stap -r 2.6.18-20061112.7.olpc.714e2030f905b0e -S . ~/whichfiles.stap ... Module saved as ./stap_16665.ko

cp ./stap_16665.ko /media/usbdisk