fp-wiki>ImportUser (Imported from MoinMoin) |
m (1 revision(s)) |
(No difference)
|
Revision as of 16:25, 24 May 2008
Bootchart Installation
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart.
Obtain the Software
To start create a folder in your home folder named bchart
mkdir bchart
Next download the bootchart-0.9.tar.bz2 from [1]
- If you would like to try to build the rpm then go ahead but it requires a bunch of useless packages most users will not need ( unless you develop in java)
Save the download to your bchart folder. If firefox saves the files to your desktop open your home folder in Nautilus or what file browser you use and drag the download to the bchart folder
Install the Software
Now open a terminal window
cd ~/bchart
next lets extract the archive
tar -xvf *.tar.bz2
Now once it is done, you'll have a bootchart-0.9 folder and the archive you just extracted. Now we need to switch to root since the install script has to write to the file system
su
now run the installer
./install.sh
Now When I installed it I ddn't have grubby installed and the install script bawked at this. This is completly ok. the installer will still install the file to correct location. if you issue this command
ls /sbin/bootchard
you should see the file listing also confirm it is in /etc/
cat /etc/bootchartd.conf
you will get the contents of the file printed to the terminal window. If you get the error like so
./install.sh: line 15: grubby: command not found ./install.sh: line 16: grubby: command not found ./install.sh: line 19: grubby: command not found ./install.sh: line 20: grubby: command not found
Modify Your Grub Conf File
- PLEASE DO NOT COPY & PASTE FROM BELOW!!! This is just a example of what your looking AT
We need to edit your grub.conf So while your still root
gedit /boot/grub/grub.conf
Look for this section ( Please Note you may have rhgb quiet after the =/ section in your Grub Conf)
title Fedora Core (2.6.14-1.1653_FC4) root (hd0,5) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ initrd /initrd-2.6.14-1.1653_FC4.img
Now what you want to do is copy this section and paste it above the "title Fedora Core... " so that you now have 2 entries for the same kernel so you should have something like so
hiddenmenu title Fedora Core Boot Chart(2.6.14-1.1653_FC4) root (hd0,5) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ initrd /initrd-2.6.14-1.1653_FC4.img title Fedora Core (2.6.14-1.1653_FC4) root (hd0,5) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ initrd /initrd-2.6.14-1.1653_FC4.img
So now we need to edit the first kernel section by adding the bootchartd command so when the system boots it records the processes. add the follwoing to the =/ of the top kernel line
init=/sbin/bootchartd
So you have the following ( I modified the Title the section in Quotes so I could tell the difference between the 2 )
title Fedora Core "Boot Chart"(2.6.14-1.1653_FC4) root (hd0,5) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ init=/sbin/bootchartd initrd /initrd-2.6.14-1.1653_FC4.img title Fedora Core (2.6.14-1.1653_FC4) root (hd0,5) kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=LABEL=/ initrd /initrd-2.6.14-1.1653_FC4.img
Once you have your grub.conf set up correct, click save in gedit and close the file. confirm the changes with
cat /boot/grub/grub.conf
you should see your complete grub.conf and the changes you made.
Reboot The System
Once you log back in open firefox and browse to this site [2]
Scroll to the bottom of the page and click the browse button. Click Filesystem then in the right window click var then click log You should see a file in there name bootchart.tar.tgz See image below [[Image:BootChartInstallation_BchartDialog.png,width=400,height=300]
Once the chart is rendered you can save the png file to your desktop. or where ever firefox saves your downloads. All you now need to do is open it up in your favorite image editor or image viewer and scroll to the top left corner to see how long it takes for your system to boot.
Edit Grub Conf Again
Once you have your system boot on the fly, place hash marks ( # ) in from of the kernel you were using for your boot chart. This way you wont be creating a boot chart every reboot.
Boot Chart
[[Image:BootChartInstallation_bchart-39seconds.png,width=400,height=300]