Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: HOWTO: Use Bootchart to Time and Track your Boot Sequence

  1. #1
    Join Date
    Jul 2007
    Location
    Austin, TX (formerly D.C)
    Beans
    359
    Distro
    Ubuntu 10.04 Lucid Lynx

    HOWTO: Use Bootchart to Time and Track your Boot Sequence

    HOWTO: Use Bootchart to Time and Track your Boot Sequence

    This simple tutorial will describe how to use bootchart in order to get a graphical representation of the processes which run during your boot process. You will also be able to view the CPU and disk usage during your boot sequence, and will get an exact time (in seconds) of how long it takes for you to boot up.

    Using bootchart is in no way difficult (and I present no new knowledge here), but it is my hope that this will introduce some in the Ubuntu community to bootcharting and give them an easy introduction to the topic.

    Motivation:

    There are various reasons that you may want to see what processes start along with your computer. Apart from satisfying your curiosity, getting a visual representation of your boot sequence may help you to fine tune your computer startup, or to diagnose why your computer may not be starting as quickly as you may like. Furthermore, getting a quantitative value for the time it takes to boot your computer will allow you to analyze how much of an improvement you make in the future

    Installing Bootchart

    In order to track the boot sequence, we will use a program called bootchart. Installing it from the repositories is dead simple:

    Code:
    sudo aptitude install bootchart
    ... And it's installed! No further configuration is necessary.

    Using Bootchart

    Using bootchart may be even easier than installing it... Just reboot! After your machine starts up next time, bootchart will create a graphical representation of the boot sequence (as a .png file), and place it in /var/log/bootchart.

    An example bootchart is attached. It was taken from an unoptimized boot sequence on my Thinkpad x61 running Hardy. You can see at the top that it took 30 seconds to boot completely, and there seem to be some places where optimizing the boot sequence (through parallelism) could possibly lead to a speedier bootup. But, such a thing is best left for another tutorial...

    Disable Bootchart

    Bootchart will, unless disabled, chart every boot process after you've installed it. This may be overkill for most users, who only want to track their boot sequence occasionally. In order to stop bootchart from charting your boot sequence, simply remove its SysV script from executing after startup:

    Code:
    cd /etc/init.d
    sudo update-rc.d -f stop-bootchart remove
     Removing any system startup links for /etc/init.d/stop-bootchart ...
       /etc/rc2.d/S99stop-bootchart
       /etc/rc3.d/S99stop-bootchart
       /etc/rc4.d/S99stop-bootchart
       /etc/rc5.d/S99stop-bootchart
    Enable Bootchart

    Re-enabling bootchart is as simple as disabling it. You may either reinstall it (through the repositories), or add it back to runlevels 2345:

    Code:
    cd /etc/init.d
    sudo update-rc.d stop-bootchart start 99 2 3 4 5 .
     Adding system startup for /etc/init.d/stop-bootchart ...
       /etc/rc2.d/S99stop-bootchart -> ../init.d/stop-bootchart
       /etc/rc3.d/S99stop-bootchart -> ../init.d/stop-bootchart
       /etc/rc4.d/S99stop-bootchart -> ../init.d/stop-bootchart
       /etc/rc5.d/S99stop-bootchart -> ../init.d/stop-bootchart
    That's it! It's so easy! I hope that this tutorial helps some of you to chart your boot process. Let me know if anybody runs into any issues.

    Mike
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	hardy-20080722-1.png 
Views:	2806 
Size:	160.7 KB 
ID:	78716  

  2. #2
    Join Date
    Dec 2006
    Location
    Maryland
    Beans
    95
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    Didn't work for me, installed, rebooted, and nothing in /var/log/bootchart

    Then tried this:

    Code:
    sudo update-rc.d stop-bootchart start 99 2 3 4 5 .
    And got this:

    Code:
    System startup links for /etc/init.d/stop-bootchart already exist.
    Last edited by erwall; July 28th, 2008 at 10:48 PM.

  3. #3
    Join Date
    Jul 2007
    Location
    Austin, TX (formerly D.C)
    Beans
    359
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    Didn't work for me, installed, rebooted, and nothing in /var/log/bootchart
    For most people, bootchart should work "out of the box". Otherwise, troubleshooting seems a bit ambiguous.

    What distro are you running? Also, did you do something non-standard to your java installation? Bootchart depends on java, so if you have weirdness going on with your JRE then it might make something break. What's the output of 'which java' and 'which rsvg'?

    A quick look around and I came up with this thread. Turns out that bootchart doesn't run when FSCK checks the disc, and certain boot options can stop it from working, too.

    Perhaps one of these things applies to you? You could also try a good old reinstall:

    Code:
    sudo aptitude reinstall bootchart
    Let me know if the problem resolves itself.
    Mike

  4. #4
    Join Date
    Dec 2006
    Location
    Maryland
    Beans
    95
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    I have what I consider a pretty vanilla install of Hardy. The output of which java and which rsvg show them both in /usr/bin

    After reading the other post you provided I'm wondering if my having 'startup-manager' installed has anything to do w/it...

    Thanks for the help so far!

  5. #5
    Join Date
    Jul 2007
    Location
    Austin, TX (formerly D.C)
    Beans
    359
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    Code:
    After reading the other post you provided I'm wondering if my having 'startup-manager' installed has anything to do w/it...
    You mean this one? It doesn't sound far-fetched to me that it might interfere with bootchart. I know that it has issues out-of-the-box dealing with display managers other than XDM/KDM/GDM, and there are probably other programs that might interfere with its performance, as well.

    Let me know if you figure anything out!
    Mike

  6. #6
    Join Date
    Dec 2006
    Location
    Maryland
    Beans
    95
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    Quote Originally Posted by mbsullivan View Post
    Code:
    After reading the other post you provided I'm wondering if my having 'startup-manager' installed has anything to do w/it...
    You mean this one? It doesn't sound far-fetched to me that it might interfere with bootchart. I know that it has issues out-of-the-box dealing with display managers other than XDM/KDM/GDM, and there are probably other programs that might interfere with its performance, as well.

    Let me know if you figure anything out!
    Mike
    Yep, that's it. I'll report back if I figure anything out.

  7. #7
    Join Date
    Dec 2006
    Location
    Perth Amboy, NJ
    Beans
    141
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    sorry to ask but does anyone know where the config files are for bootchart
    i'm trying to put the patch in that does bootchart after the GNOME startup
    http://www.gnome.org/~lcolitti/gnome-startup/analysis/

    (i've checked /etc and i don't have bootchartd.conf like the patch says)

    any help is appreciated, thanks a bunch.
    Welcome to the world of Open Source!!!
    Linux User #471120 Ubuntu User #21997
    Jaunty Jackalope 9.04

  8. #8
    Join Date
    Jul 2007
    Location
    Austin, TX (formerly D.C)
    Beans
    359
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    (i've checked /etc and i don't have bootchartd.conf like the patch says)
    You're right, the Ubuntu packages do not install a configuration file for bootchart. I'm not sure of any fix (there may be one) other than going and installing it some other way.

    The Debian packages are more updated, and might (note: I don't know) work out for you. I've attached the current version from Debian to this post. You can try it out by downloading it and installing it:

    Code:
    sudo dpkg -i [name].deb
    Uninstall the Ubuntu package first, if you want to try it.

    Mike

  9. #9
    Join Date
    Dec 2007
    Beans
    16

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    OK, I have bootchart running under eeeUbuntu (8.04 with netremix and a few hardware tweaks). But it reports much faster boot than I actually experience. It says 22 seconds, I say 45 seconds to login prompt (gdm).

    I thought is was measuring to login prompt. Am I wrong?

  10. #10
    Join Date
    Dec 2006
    Location
    Perth Amboy, NJ
    Beans
    141
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Use Bootchart to Time and Track your Boot Sequence

    nope, bootchart only checks up to where you finish with the startup processes. There is a patch where you can have bootchart check up to the login promapt and including the gdm login process up to where your main screen comes up. Look up boootchart patch either here or in Google
    Welcome to the world of Open Source!!!
    Linux User #471120 Ubuntu User #21997
    Jaunty Jackalope 9.04

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •