From Fedora Project Wiki

m (1 revision(s))
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- page was renamed from DefaultServices/BootChartInstall
<!-- page was renamed from DefaultServices/BootChartInstall to BootChartInstall
-->
-->
<!-- after Fedora 8 release -> yum -y install bootchart
<!-- page was renamed from BootChartInstall
-->
-->
<!-- this page needs some rework
-->
= 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
<pre>
mkdir bchart
</pre>
Next download the bootchart-0.9.tar.bz2 from [http://www.bootchart.org/download.html]
*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
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 can later be rendered in a PNG, SVG or EPS encoded chart.


== Install the Software ==
== Installing Bootchart ==


Now open a terminal window
Since Fedora 8, Bootchart is packaged in the Fedora repository. Just install the ''bootchart'' package, with the graphical package manager, or with yum.
<pre>
cd ~/bchart
</pre>


== Checking bootloader configuration ==


next lets extract the archive
For Bootchart to work, a small change is needed to the bootloader configuration file - usually ''/boot/grub2/grub.cfg''. This change should usually be made automatically when Bootchart is installed, but you can check to make sure. Edit the bootloader configuration file. Look at the entry for the kernel you usually boot (if you're not sure, it will be the first one). Check that, at the end of the ''kernel'' line, the phrase:
<pre>
tar -xvf *.tar.bz2
</pre>
 
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
<pre>
su
</pre>
 
now run the installer
<pre>
./install.sh
</pre>
 
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
<pre>
ls /sbin/bootchard
</pre>
 
you should see the file listing
also confirm it is in /etc/
<pre>
cat /etc/bootchartd.conf
</pre>
 
you will get the contents of the file printed to the terminal window.
If you get the error like so
<pre>
./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
</pre>
 
=== 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
<pre>
gedit /boot/grub/grub.conf
</pre>
 
 
Look for this section ( Please Note you may have rhgb quiet after the =/ section in your Grub Conf)
<pre>
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
</pre>
 
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
<pre>
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
</pre>
 
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
<pre>
<pre>
init=/sbin/bootchartd
init=/sbin/bootchartd
</pre>
</pre>
has been added. If not, add it now.


So you have the following ( I modified the Title the section in Quotes  so I could tell the difference between the 2 )
Newer fedora installs with systemd may require a different parameter:
<pre>
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
</pre>
 
Once you have your grub.conf set up correct, click save in gedit and close the file. confirm the changes with
<pre>
<pre>
cat /boot/grub/grub.conf
init=/usr/lib/systemd/systemd-bootchart
</pre>
</pre>


you should see your complete grub.conf and the changes you made.
== Using Bootchart ==


== Reboot The System ==
As long as the bootloader is correctly configured, from now on, each time your system boots, Bootchart will run and store data on the boot. The data is stored in the file ''/var/log/bootchart.tgz'', but in its raw form is really only usable by developers. If you are helping to test boot times, you may be asked to upload this data somewhere. If you would like to see a chart of the boot process on your machine, run the command ''bootchart'' as root. It will generate a file named ''bootchart.png'', wherever you run it from. This file is a graphical chart showing the boot process on your machine, as well as some information on your system and the total time of the boot process. It will look similar to this example:
 
<br>
Once you log back in open firefox and browse to this site
<br>
[http://www.bootchart.org/download.html]
[[Image:BootChartInstallation_bchart-39seconds.png|400px]]
 
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] 
<!-- [[Image:BootChartInstallation_btchartdefault.png]]
-->
 
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] 
<!--[[Image:BootChartInstallation_bchart-39seconds.png]]
-->

Latest revision as of 09:27, 19 July 2014


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 can later be rendered in a PNG, SVG or EPS encoded chart.

Installing Bootchart

Since Fedora 8, Bootchart is packaged in the Fedora repository. Just install the bootchart package, with the graphical package manager, or with yum.

Checking bootloader configuration

For Bootchart to work, a small change is needed to the bootloader configuration file - usually /boot/grub2/grub.cfg. This change should usually be made automatically when Bootchart is installed, but you can check to make sure. Edit the bootloader configuration file. Look at the entry for the kernel you usually boot (if you're not sure, it will be the first one). Check that, at the end of the kernel line, the phrase:

init=/sbin/bootchartd

has been added. If not, add it now.

Newer fedora installs with systemd may require a different parameter:

init=/usr/lib/systemd/systemd-bootchart

Using Bootchart

As long as the bootloader is correctly configured, from now on, each time your system boots, Bootchart will run and store data on the boot. The data is stored in the file /var/log/bootchart.tgz, but in its raw form is really only usable by developers. If you are helping to test boot times, you may be asked to upload this data somewhere. If you would like to see a chart of the boot process on your machine, run the command bootchart as root. It will generate a file named bootchart.png, wherever you run it from. This file is a graphical chart showing the boot process on your machine, as well as some information on your system and the total time of the boot process. It will look similar to this example:

File:BootChartInstallation bchart-39seconds.png