My *nix world

sweets from the bootchart2

Starting with April 2012 a new version of the old bootchart have appeared in Gentoo's package repository. It is named bootchart2. You can read the bootchart2's README file to understand why do we have a new bootchart(2) and what are the main introduced features.

I previously had some experience using bootchart so I had also the old version already installed on my system. To make sure you will upgrade this piece of software properly, make sure that you will uninstall the old version then install the new version of software.

One thing that I've noticed regarding bootchart2 is the fact that there have been introduced a configuration file (/etc/bootchartd.conf) which allows us to configure few things about how data is collected, logged and then plotted to a chart when the boot process is considered as completed.

bootchart2

The following variables allows us to configure how bootchart2 is working:

  • SAMPLE_HZ
  • BOOTLOG_DEST
  • AUTO_RENDER
  • AUTO_RENDER_FORMAT
  • AUTO_RENDER_DIR
  • CUSTOM_POST_CMD
  • EXIT_PROC

All of them are already configured OK except the EXIT_PROC variable which in my case was defined as "agetty mgetty mingetty". Maybe this was because I have installed bootchart2 before I uninstalled bootchart (the old version).

Here you can find the current value of EXIT_PROC variable which at the time I wrote this article was:

This one is important because the /lib/bootchart/bootchart-collector will collect data in $BOOTLOG_DEST until it finds a process that is contained in the $EXIT_PROC, then it stops, i.e.

Besides these I also have found that a new GUI tool had been given to the user, it is called pybootchartgui:

The --boot-time option can be used when you want only to get the total boot time at the console output:

Also I've found especially useful the --crop-after option that will filter the processes shown into the chart based on the specified (e.g. xfwm4). More than this, the chart will plot a red vertical dotted line that represents the point in time when your boot process is considered as completed (see my chart).

Another interesting option is --interactive which will show the chart in its own (Python) GUI:

bootchart2

click here to zoom

This GUI has two tabs: one that shows only the kernel boot (k-boot) and one that shows the full tree chart (including the k-boot). In the picture above the print-screen has been taken from the full-tree tab.

I found that we can use this tool not even for measuring the boot process timing but also any kind of process. For instance, I wanted to measure what's happening during the compilation of thunar source code (emerge thunar) so I could use bootchart2 to measure this:

bootchartd start "" emerge thunar "" bootchartd stop

This (bootchartd) has collected the system data during the "emerge thunar" process then has created a chart that showed me step by step what was happening during the compilation and how much took each subprocess:

bootchart2

click here to zoom

I am not saying that I have shown a good example of usage but anyway, I only wanted to prove that this piece of tool can be used even for other things than measuring the boot time.

Thank you Michael Meeks for this pleasant surprise.

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

 
The following two tabs change content below.
sweets from the bootchart2

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: