Systemtap: Difference between revisions
Jump to navigation
Jump to search
(finish up first notes) |
m (categorization) |
||
Line 45: | Line 45: | ||
Hit ctrl-c to stop and then read foo.txt. Then drink heavily. |
Hit ctrl-c to stop and then read foo.txt. Then drink heavily. |
||
[[Category:OS]] |
|||
[[Category:Developers]] |
|||
[[Category:Software development]] |
Latest revision as of 04:21, 6 January 2007
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
cp /usr/local/bin/staprun /media/usbdisk
put the disk in the olpc, copy stuff over
./staprun stap_16665.ko > foo.txt
Hit ctrl-c to stop and then read foo.txt. Then drink heavily.