Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

merge of bootchart-collector and pybootchartgui

collector: freopen /proc/kmsg in write mode

freopen("/proc/kmsg", "a", stderr) => -EBADF
...but...
freopen("/proc/kmsg", "w", stderr) => a valid FILE *

I'm guessing that this fails in the append case because the
underlying lseek call fails because /proc/kmsg is of length zero,
or otherwise because it is not an on-disk file.
latest commit 0c29ee8257
Matt MattSANU authored xrmx committed
Octocat-spinner-32 collector collector: freopen /proc/kmsg in write mode October 03, 2013
Octocat-spinner-32 examples Remove what looks like an artifact from some hand editing, this makes… April 22, 2009
Octocat-spinner-32 pybootchartgui pybootchartgui: skip proc_stat.log entries without any times April 02, 2013
Octocat-spinner-32 .gitignore Ignore generated files September 22, 2013
Octocat-spinner-32 AUTHORS Update Michael's email September 18, 2013
Octocat-spinner-32 COPYING remember to update the COPYING file November 22, 2010
Octocat-spinner-32 MAINTAINERS add Harald. November 19, 2010
Octocat-spinner-32 Makefile Makefile: Fix @EARLY_PREFIX@ error May 28, 2013
Octocat-spinner-32 NEWS Update NEWS September 17, 2013
Octocat-spinner-32 README README: added HOWTO for initramfs with dracut November 19, 2010
Octocat-spinner-32 README.pybootchart improve the help for --annotate. November 26, 2009
Octocat-spinner-32 TODO Fix typo in TODO September 26, 2010
Octocat-spinner-32 bootchart-done.service.in Make component naming and paths more flexible February 11, 2013
Octocat-spinner-32 bootchart-done.timer.in Make component naming and paths more flexible February 11, 2013
Octocat-spinner-32 bootchart.service.in Make component naming and paths more flexible February 11, 2013
Octocat-spinner-32 bootchart2.1 Add manpages for bootchart2, bootchartd and pybootchartgui March 07, 2011
Octocat-spinner-32 bootchartd.1 Fix self reference in bootchartd SEE ALSO section man page. March 21, 2011
Octocat-spinner-32 bootchartd.conf bootchartd: Sort list of process in `EXIT_PROC` alphabetically October 12, 2012
Octocat-spinner-32 bootchartd.in Make component naming and paths more flexible February 11, 2013
Octocat-spinner-32 pybootchartgui.1 Add manpages for bootchart2, bootchartd and pybootchartgui March 07, 2011
Octocat-spinner-32 pybootchartgui.py Add license info to all files, as suggested in Issue 11 June 14, 2009
README
			    bootchart2
			   ------------

	bootchart2 was created from the fusion of three separate
pieces of work. First - the original bootchart: a shell script, and a
Java visualisation tool written by Ziga Mahkovec. Some of the original
shell scripting, and the concept remain unchanged from this time.

	bootchart2 replaces the Java visualisation with the more
friendly and flexible pybootchartgui (cf. README.pybootchart) written
by Anders Norgaard and Henning Niss, this lives mostly in the
pybootchart/ sub-directory.

	bootchart2 embeds a new collector, based on a port to C of the
inner-loop of the original bootchart collector shell-script by Scott
James Remnant. This has been subsequently re-written by Michael Meeks
to use the higher granularity 'taskstat' data available via a twisted
netlink interface, amongst other new features.


			    Using bootchart2 ?
			   --------------------

	After install, simply add these options to your kernel
command-line, normally in /boot/grub/menu.lst:

	initcall_debug printk.time=y quiet init=/sbin/bootchartd ...

	Then - after bootup, run 'pybootchartgui -i' to get an interactive
chart rendering tool. If you want to chart the initrd, add
rdinitrd=/sbin/bootchartd to the kernel command-line.

	To make bootchart2 work best, please ensure your kernel is
configured with CONFIG_PROC_EVENTS=y and CONFIG_TASKSTATS=y, without
these we are slower, less accurate, and produce an uglier task 
hierarchy.

	If you want to start bootchart2 in a dracut (version >= 008)
initramfs, you have to change "init=/sbin/bootchartd" to 
"rdinit=/sbin/bootchartd" and regenerate the initramfs with bootchart support
with "# dracut -f -a bootchart".

			    Why bootchart2 ?
			   ------------------

	There are a number of interesting additional features:

	* higher resolution - the taskstat interface gives nanosecond
	  timing information, where /proc/*/stat information is far,
	  far less reliable and useful.

	* higher performance - the C re-write allows us to collect more
	  data, more quickly - sampling at ~50+Hz.

	* using PROC_EVENTS we can determine accurate process parentage
	  without needing to use a (poorly maintained) 'acct' binary

	* no Java dependency - with the visualisation in easy-to-hack
	  python, development is quicker, and dependencies more commonly
	  found.

	* simpler wrappers - by using ptrace to connect to and extract
	  data from the collector, we no longer require a consistently
	  visible set of logs accessible via a shared file-system.

	* built-in visualisation - allowing some level of interaction,
	  zoom and so on.

	* better rendering - render to png, or svg, with added event
	  annotation support, and 'show more' functionality.

	* cumulative, and total CPU time graphing in the boot-chart.

	* and no doubt more by the time this is actually read.


			    Contributing
			   --------------

	For potential future work, see the TODO, and/or mail the authors,
wander over to #bootchart2 on irc.freenode.net. All patches most welcome.
Something went wrong with that request. Please try again.