Bootchart2

Introduction
Because of some limitations in the original Bootchart Michael Meeks made a fork, and started to implement some features he felt were missing. Some of the main advantages for Bootchart2 are
 * Possible to run inside a initramfs, and survive the switch_root
 * A information collector written in C that makes a lesser impact on boot recource-wise, and makes bigger resolutions on the collected data possible.
 * Integration with pybootchartgui.

Emerging packages
First if you have bootchart installed, you need to uninstall it as it blocks bootchart2:

You may find it helpful to also read the official bootchart2 documentation:

Kernel configuration
Bootchart needs a couple of settings in the kernel to be turned on so that it can get the information it needs. You can check you configuration by running

This should output something like: CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_PROC_EVENTS=y

If not you have to change your kernel configuration, and you found the options in order: [ ] General setup [x] Export task/process statistics through netlink [x] Enable per-task delay accounting [ ] Device Drivers [ ] Connector - unified userspace <-> kernelspace linker [x] Report process events to userspace

/boot/grub/grub.conf configuration
All the following steps can also be done in Grub 2, but then the kernel lines should be added to the file '/etc/default/grub' on the line

Bootchart2 without initramfs
This is by far the easiest, the only thing you have to do after installing Bootchart2 is adding the following to your kernel command:

quiet is not really needed, but recommended as your kernel will print lots of output at startup otherwise.

And your kernel line will become something like this:

Or if you re using genkernel:

Bootchart2 in ramdisk
The easiest way to archieve this is to use dracut. Make sure you have the bootchart module installed (i.e. the bootchart useflag for dracut). Then run and then edit your grub.conf to use the new initramfs. After this you edit you grub configuration file (most often /boot/grub/grub.conf), and add the following options:

quiet is not really needed, but recommended as your kernel will print lots of output at startup otherwise.

And your kernel lines will become something like this:

or in Grub 2

Now you have to make sure that bootchart2 gets stopped when the boot is finished. A initscript is on the way to make this easier, but currently the easiest way is to just add something like:

if you are using baselayout1

to the start function if you are using baselayout2

Bootchart configuration
Bootchart is configured in /etc/bootchartd.conf and that file is well commented and self explained.

Troubleshooting
If you cannot find a /var/log/bootchart.tgz after boot, there are some possibilities:
 * bootchart was never started
 * bootchart was never stopped

Run If you have a process named bootchart-collector then the process was never stopped. If you are running a headless machine, or for other reasons do not start a graphical shell, then you have to add your getty to the list of EXIT_PROC, most often agetty:

If you do run Bootchart2 from within a ramdisk, read that paragraph again on how to terminate bootchart2 at the end of the boot process.