6

Using bootchart to capture your boot process openSUSE 11

Have you booted up your computer and wondered, what is really going on here. Why is it taking so long, or how could a new kernel, or a kernel modification help speed up my boot. Well wonder no more.

There is an application for Linux called Bootchart, which allows you to do just that. First, lets install it and see what we get. To install on openSUSE just run:

sudo zypper in bootchart -y

You now have it installed, but now what? Here you can either type in init=/sbin/bootchartd in the grub menu box, or (this is the approach I took) add an entry into grub’s /boot/grub/menu.lst. For this example we will be utilizing YaST, to copy our current default Grub entry and modify to work with bootchart (you only have to log into this option when you want to chart your boot process).

To do this, do the following:

Log into YaST, go to System on the left hand side, and click on “Boot Loader” in the right hand pane.

YaST

This will bring up the Grub Menu Editor, Next Click on the choice that has the check mark next to it (this is your default kernel option that gets chosen when you boot).

YaST

Now click on “Add”, and choose the “Clone Selected Section” option

YaST

Click “Next”, now in the “Optional Kernel Command Line Parameter” field, put in “init=/sbin/bootchartd” (without the quotes) and assign a reasonable name (I try to keep the name the same as my copied selection, and add – BootChart to the end).

YaST

Click on “Ok” and verify you see the new option in your list of Grub menu choices:

YaST

Now it is time to reboot your computer and at the Grub menu, choose your new Grub menu option that was just created.

Ok, cool.. So what did that do?
It actaully created a compressed file in /var/log named bootchart.tgz. But having just that file would do nothing for you, since it’s not in a readable format.

So here is where we work all the magic. To format what we just made into a usable format run:

sudo bootchart –format png

Important Note: That is 2 -’s not a single -, 2 different ones – -
Note: at this point you can format it as svg, png or eps by changing the last option.

Here is an example of what you’d get:
Bootchart

Now, you are all done. You can wow your co-workers, impress your bosses, or do whatever you want to your kernel to try to trim that time down. Now when you next log into your kernel, you just continue going into your original default option, and the next time you want to chart your boot time again, just go back to that option added. If you’re going to do a new kernel to test the new kernels speed, make sure you add the init=/sbin/bootchard to the kernel params when you put it into grub.

Here you can see a comparison I did to see what I would gain from compiling a kernel with just a fewer options (I didn’t want to take too much time and hammering out a very thing kernel, just to show the usage of the tool for this write up, but here are two of my charts).

Vanilla 2.6.27.2 Kernel
SUSE 2.6.27.1 Kernel from openSUSE 11.1 Beta 3

I hope you enjoyed this write up, and with all the extra time on your hands you should check out:
BootChart.org as they obviously have good material there regarding bootchart.



1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

About the Author

I am ben kevan.. Well yeah. .that's about it.

Comments (6)

Trackback URL | Comments RSS Feed

  1. Hi! I would like to know if I could obtain your OK to translate to spanish this entry and publish into my humble webpage. Thank you!!

    Have a nice day ;-)
    TooManySecrets

  2. ben.kevan says:

    Hi TooManySecrets,

    Feel free to translate to Spanish. Please just trackback to the original posting, thank you.

  3. [...] Basado en la entrada del Blog de Ben Kevan [...]

  4. [...] Using bootchart to capture your boot process openSUSE 11 [...]

  5. [...] previous posting of mine which will allow you to check your before and after boot times. Check out the posting here for [...]

  6. Hi! I would like to know if I could obtain your OK to translate to spanish this entry and publish into my humble webpage. Thank you!!
    ————————–
    sujatha

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.