From f1c24fea94e19cf2108abbeed1d36ded7102ab98 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 16 Feb 2013 12:40:33 -0500 Subject: man: move bootchart README to manpage, docbooksify --- README | 7 ++ man/systemd-bootchart.xml | 162 +++++++++++++++++++++++++++++----------------- src/bootchart/README | 83 ------------------------ src/bootchart/bootchart.c | 11 ++++ 4 files changed, 119 insertions(+), 144 deletions(-) delete mode 100644 src/bootchart/README diff --git a/README b/README index f20bd38894..297d8f79e7 100644 --- a/README +++ b/README @@ -63,6 +63,13 @@ REQUIREMENTS: dracut (optional) PolicyKit (optional) + For systmed-bootchart a kernel with procfs support and several + proc output options enabled is required: + + CONFIG_PROC_FS + CONFIG_SCHEDSTATS + CONFIG_SCHED_DEBUG + When building from git you need the following additional dependencies: docbook-xsl diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml index f87f821257..3b755d1b20 100644 --- a/man/systemd-bootchart.xml +++ b/man/systemd-bootchart.xml @@ -48,52 +48,84 @@ systemd-bootchart - Boot performance analysis graphing tool + Boot performance graphing tool Description - - systemd-bootchart is a tool used to analyze a boot sequence. - It collects system information pertaining to the CPU and disk load, as - well as per-process information, and then creates a chart with this - information. Usually it is invoked by setting the init to - systemd-bootchart on the kernel command line. It - be run after boot to analyze running processes, though it is recommended - to use the switch when doing this. - - After collecting a certain amount of data (default: 20 seconds) it - will write the SVG chart to /run/log. This chart - can be used to find problems in the start up sequence and where these - problems exist. It is essentially a more detailed version of the - systemd-analyze plot function. + + systemd-bootchart is a + tool, usually run at system startup, that + collects the CPU load, disk load, memory + usage, as well as per-process information from + a running system. Collected results are output + as an SVG graph. Normally, systemd-bootchart + is invoked by the kernel by passing + + on the kernel commandline. systemd-bootchart will then + fork the real init off to resume normal system + startup, while monitoring and logging startup + information in the background. + + + After collecting a certain amount of data + (usually 15-30 seconds, default 20 s) the + logging stops and a graph is generated from + the logged information. This graph contains + vital clues as to which resources are being used, + in which order, and where possible problems + exist in the startup sequence of the system. + It is essentially a more detailed version of + the systemd-analyze + plot function. + + + Of course, bootchart can also be used at any + moment in time to collect and graph some data + for an amount of time. It is + recommended to use the + switch in this case. + + + Bootchart does not require root privileges, + and will happily run as a normal user. + + + Bootchart graphs are by default written + time-stamped in /run/log. + Invocation - systemd-bootchart can be invoked in several different ways: + systemd-bootchart can be invoked in several different ways: Kernel invocation - The kernel can invoke systemd-bootchart - instead of the init process. In itself, systemd-bootchart - will invoke /sbin/init if invoked in - this manner. + The kernel can invoke + systemd-bootchart + instead of the init process. In turn, + systemd-bootchart + will invoke /sbin/init. + Started as a standalone program - One can execute systemd-bootchart as - normal application from the commandline. In this mode - it is highly recommended to pass the "-r" flag in order - to not graph the time elapsed since boot and before - systemd-bootchart was started, as it may result in - extremely large graphs. - + One can execute + systemd-bootchart + as normal application from the + commandline. In this mode it is highly + recommended to pass the + flag in order to + not graph the time elapsed since boot + and before systemd-bootchart was + started, as it may result in extremely + large graphs. @@ -101,25 +133,30 @@ Options - These options can be set globally in the /etc/systemd/bootchart.conf - file. + These options can also be set in the + /etc/systemd/bootchart.conf + file. See + bootchart.conf5. + - - Specify the amount of samples, N, to - record total before bootchart exits. Each sample will - record at intervals defined by --freq. + + Specify the number of + samples, N, + to record. Samples will be recorded at + intervals defined with . + - - Specify the sample log frequency, N. - This can be a fractional number, but must be larger than - 0.0. Most systems can cope with values under 25-50 without + + Specify the sample log + frequency, a positive real f, in Hz. + Most systems can cope with values up to 25-50 without creating too much overhead. @@ -128,36 +165,36 @@ Use relative times instead of absolute times. This is useful for using bootchart at post-boot - time to profile an already booted system, otherwise the - graph would become extremely large. If set, the + time to profile an already booted system. Without this + option the graph would become extremely large. If set, the horizontal axis starts at the first recorded sample - instead of time=0.0. + instead of time 0.0. - Disable filtering of tasks tasks that + Disable filtering of tasks that did not contribute significantly to the boot. Processes that are too short-lived (only seen in one sample) or that do not consume any significant CPU time (less than - 0.001sec) will not be displayed in the output graph. + 0.001 s) will not be displayed in the output graph. - - Configures the output folder for writing - the graphs. By default, bootchart writes the graphs to + + Specify the output folder for the + graphs. By default, bootchart writes the graphs to /run/log. - - Set init binary to run. Defaults to - /sbin/init. + + Use this init binary. Defaults to + /sbin/init. @@ -165,7 +202,11 @@ Enable logging and graphing - of processes PSS memory consumption. + of processes' PSS (Proportional Set Size) + memory consumption. See filesystems/proc.txt + in the kernel documentation for an + explanation of this field. + @@ -177,14 +218,14 @@ - + Horizontal scaling factor for all variable graph components. - + Vertical scaling factor for all variable graph components. @@ -197,19 +238,20 @@ Output - systemd-bootchart generates SVG graphs. In order to render these + systemd-bootchart generates SVG graphs. In order to render those on a graphical display any SVG capable viewer can be used. It should be noted that the SVG render engines in most browsers (including Chrome and Firefox) are many times faster than dedicated graphical applications - like Gimp and Inkscape. Just point your browser at "file:///run/log"! + like Gimp and Inkscape. Just point your browser at ! History - This version of bootchart was implemented from scratch, but inspired - by former bootchart incantations: + This version of bootchart was implemented from + scratch, but is inspired by former bootchart + incantations: @@ -247,7 +289,6 @@ has been collected. Also, the data kept in memory is reduced to the absolute minimum needed. - @@ -259,11 +300,10 @@ Bugs - For bugs, please contact the author or current maintainer: - - Auke Kok - auke-jan.h.kok@intel.com - + For bugs, please contact the author and current maintainer: + + Auke Kok auke-jan.h.kok@intel.com + diff --git a/src/bootchart/README b/src/bootchart/README deleted file mode 100644 index 03b0fe95ee..0000000000 --- a/src/bootchart/README +++ /dev/null @@ -1,83 +0,0 @@ - -Bootchart - a 'startup' graphing tool - --- - -Bootchart is a tool, usually run at system startup, that collects and graphs -the CPU and disk load of the system as it works. The output of bootchart is -an SVG graph. Normally, bootchart is invoked as `bootchartd` by the kernel -by passing "init=/sbin/bootchartd" to the kernel. Bootchart will then fork -init off to resume normal system startup, while monitoring and logging -startup information in the background. - -After collecting a certain amount of data (usually 15-30 seconds) the logging -stops and a graph is generated from the logged information. This graph -contains vital clues to which resources are being used, in which order, and -where possible problems exist in the startup sequence of the system. - -Of course, bootchart can also be used at any moment in time to collect and -graph some data for an amount of time. Bootchart does not even require root -privileges to do so, and will happily run as a normal user. Bootchart graphs -are by default written time-stamped in /run/log. - --- - -This version of bootchart was implemented from scratch and inspired by former -incantations of bootchart: - -- The original bash/shell code implemented bootchart. This version logged all -data into a compressed tarball for later processing, and did not create a graph -on it's own. - -- The C-code implementation found in Ubuntu. This version replaced above shell -code version with a faster and efficient data logger, but still did not graph -code itself. - -- the original Java-based bootchart, the original graphing program that created -a bootchart graph from logged data. - -- the pybootchartgui.py program, which created a graph based on the data logged -by either standalone data logger. - -The version you are looking at combines these 2 parts into a single program, -which makes running it and creating graphs a bit more efficient and simple. -You can now run a single program at startup instead of 2. There are no timing -problems (the graphing stage will never run if the logging stage didn't -finish). The logged data isn't being written to disc first, then read again. -Also, the data kept in memory is reduced to the absolute minimum needed to -keep memory use low. - --- - -Requirements: glibc. Your kernel must have procfs support and several -proc output options enabled: - CONFIG_PROC_FS - CONFIG_SCHEDSTATS - CONFIG_SCHED_DEBUG -at a minimum. bootchartd itself does not require any graphics library -to generate the SVG output file. - --- - -Configuration: please see bootchartd --help, as well as /etc/bootchartd.conf -and/or /usr/share/doc/bootchart/bootchartd.conf.example for a list of -configurable options. - --- - -Many thanks to those who contributed ideas and code: - - Ziga Mahkovec - Original bootchart author - - Anders Norgaard - PyBootchartgui - - Michael Meeks - bootchart2 - - Scott James Remnant - Ubuntu C-based logger - - Arjan van der Ven - for the idea to merge bootgraph.pl functionality - --- - -For bugs, please contact the author or current maintainer: -Auke Kok - --- - -Download bootchart releases here: http://foo-projects.org/~sofar/bootchart/ -Source code is hosted here: git://github.com/sofar/bootchart diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index 0c4d3e3432..017632781a 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -20,6 +20,17 @@ along with systemd; If not, see . ***/ +/*** + + Many thanks to those who contributed ideas and code: + - Ziga Mahkovec - Original bootchart author + - Anders Norgaard - PyBootchartgui + - Michael Meeks - bootchart2 + - Scott James Remnant - Ubuntu C-based logger + - Arjan van der Ven - for the idea to merge bootgraph.pl functionality + + ***/ + #include #include #include -- cgit v1.2.3-54-g00ecf