SystemTAP boot process instrumentation
======================================
This directory contains some info about using SystemTAP for probing
file opens, and proces fork & runtimes during boot. These instructions
were put together while using Fedora Core 5, Test 2, which has a build
of SystemTap 0.5.2-2
1. Generate the SystemTAP binary probe
stap -g -k -p 4 initprocs.stp
NB I only need '-g' (Guru Mode) here because I wanted to get access
to some fields in the current task structure - don't use -g unless
you really need it
2. Move the generated kernel module somewhere safe
mv /tmp/stapUf342/stap_2433.ko /boot/stap/initprocs.ko
3. Copy the init-stap.sh script into place
cp stap-init.sh /boot/stap/init.sh
4. Reboot and at the GRUB menu, select the desired kernel and
set it to use a custom init script, by pressing 'a' and then
entering 'init=/boot/stap/init.sh'
5. ...wait for startup to complete...
6. Login & tell systemtap daemon to shutdown
killall stpd
7. Copy the logs out of tmpfs to somewhere safe
cp /boot/stap/data/initprocs.log /root/initprocs.log
Now use Perl to do some reporting on the data collected,
1. Summarise time of each init script
init-time-summary.pl < initprocs.log
2. Summarise cummulative files read/write for every process
process-summary.pl < initprocs.log
3. Display proc tree rooted at 'start_udev'
process-tree.pl start_udev < initprocs.log
4. Display time taken by all runs of modprobe
process-time.pl modprobe < initprocs.log
...more...