Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to write a command line tool that records the boot process information in Linux, and then renders it in a chart format (a textual chart would do). How do I programmatically obtain the this boot process information? Languages that I am allowed to use are C and C++.

Thanks in advance. :-)

share|improve this question
bootchart.org – badp Oct 31 '10 at 14:24
@badp: Thanks. I am aware of that application. This is a homework assignment, so I cannot show my professor some existing application. – missingfaktor Oct 31 '10 at 14:27
This question may be too board. I'm tempted to answer "parse the log files" but I'm not sure whether that's the information you need. Please consider breaking the question down to several ones like "How do I monitor memory usage during boot?". – phunehehe Oct 31 '10 at 15:09
While you can't turn in an existing application, I imagine that the source code for a program that does exactly what you want to do, might be a useful resource in hunting down the solution. – Steven D Oct 31 '10 at 15:33
In particular, the Data Collection section of the Bootchart "How it Works" page explains exactly what it does – Michael Mrozek Nov 1 '10 at 1:22

Well, if no-one else is writing answer for this question (instead of valid comments), I'll do it.

bootchart.org is tool for doing exactly this.

Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.

There is rather good page explaining how it works: Bootchart - How it works?. In short, it's wrapper for normal init script. See for example this document for more information on init.

That wrapper script then starts normal init and collects statistics from various places (/proc/stat, /proc/diskstats, /proc/[PID]/stat) as early as possible.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.