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.
The following variables allows us to configure how bootchart2 is working:
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:
EXIT_PROC="quot;kdm_greet xterm konsole gnome-terminal metacity mutter gnome-shell compiz ldm icewm-session enlightenment <strong>xfwm4</strong> openbox"quot;
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.
if [ -n "quot;$EXIT_PROC"quot; -a -n "quot;$( pidof $EXIT_PROC )"quot; ]; then
# give an unambiguous settle afterwards - so we get
# more post-login data for slow systems
# Write / flush the log files
Besides these I also have found that a new GUI tool had been given to the user, it is called pybootchartgui:
Usage: pybootchartgui [options] PATH, ..., PATH
--version show program's version number and exit
-h, --help show this help message and exit
-i, --interactive start in active mode
-f FORMAT, --format=FORMAT
image format (png, svg, pdf); default format png
-o PATH, --output=PATH
output path (file or directory) where charts are
-n, --no-prune do not prune the process tree
-q, --quiet suppress informational messages
-t, --boot-time only display the boot time of the boot in text format
--very-quiet suppress all messages except errors
--verbose print all messages
--profile profile rendering of chart (only useful when in batch
mode indicated by -f)
--show-pid show process ids in the bootchart as 'processname
--show-all show all process information in the bootchart as
'/process/path/exe [pid] [args]'
--crop-after=PROCESS crop chart when idle after PROCESS is started
--annotate=PROCESS annotate position where PROCESS is started; can be
specified multiple times. To create a single
annotation when any one of a set of processes is
started, use commas to separate the names
filename to write annotation points to
The --boot-time option can be used when you want only to get the total boot time at the console output:
eugen-gentoo # pybootchartgui -q Â¢ÂÂ-boot-time --crop-after=xfwm4
No path given, trying /var/log/bootchart.tgz
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:
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:
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.
Latest posts by Eugen Mihailescu (see all)
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
- Symfony authentication redirect after each request - January 22, 2018
- Emerging Perl without Perl in Gentoo - September 26, 2017