SYSTEMD-BOOTCHART(1)

πŸ“¦
version 235 Β· 2 versions
  • 235 Β· arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 234 Β· debian bookworm, ubuntu jammy
, in arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– systemd-bootchart(1) β€” the manual page, but make it a vibe πŸ’–

okay bestie, sit down, grab a strawberry drink πŸ“, because we're talking about systemd-bootchart β€” the boot performance graphing tool, and she is iconic. This is section 1 of the manual, she lives in systemd land, and she's about to tell you literally everything about your system's startup era. no cap. ✨


🌸 NAME 🌸

systemd-bootchart β€” the boot performance graphing tool. that's the whole name. short, sweet, main character energy. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. systemd-bootchart is a tool that usually runs at system startup, and what she does is collect the CPU load, the disk load, the memory usage, plus per-process info from a running system. and then? she outputs all of it as an SVG graph. slay.

normally, systemd-bootchart gets invoked by the kernel β€” you do that by passing init=/usr/lib/systemd/systemd-bootchart on the kernel command line, and you also add initcall_debug so she can collect data on the kernel init threads. then systemd-bootchart forks the real init off to resume normal system startup, while she monitors and logs startup info in the background. multitasking queen fr fr πŸ’…

after collecting a certain amount of data (usually 15-30 seconds, default 20 s), the logging stops and a graph gets generated from the logged info. this graph contains vital clues about which resources are being used, in which order, and where possible problems exist in the startup sequence of the system. it's essentially a more detailed version of the systemd-analyze plot function. iykyk.

and of course β€” bootchart can also be used at any moment in time to collect and graph some data for an amount of time. if that's your plan, it is highly recommended to use the --rel switch. please. for me. πŸ™

good news: bootchart does not require root privileges, and she will happily run as a normal user. no sudo needed, we love an accessible icon 🌈

bootchart graphs are by default written time-stamped in /run/log and saved to the journal with MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518. the journal field BOOTCHART= contains the bootchart in SVG format. cute.


πŸŽ€ INVOCATION πŸŽ€

systemd-bootchart can be invoked in several different ways:

Kernel invocation

the kernel can invoke systemd-bootchart instead of the init process. in turn, systemd-bootchart will invoke /usr/lib/systemd/systemd. data will be collected on kernel init threads and also processes including the services started by systemd. ✨

systemd unit

a unit file is provided: systemd-bootchart.service. if enabled when the system starts, it will collect data on processes including the services started by systemd. set it and forget it, bestie 🫢

Started as a standalone program

you can also execute systemd-bootchart as a normal application from the command line. in this mode it is highly recommended to pass the -r flag, so she doesn't graph the time elapsed since boot and before systemd-bootchart was started β€” because that may result in extremely large graphs 😭. also heads up: the time elapsed since boot might also include any time that the system was suspended. so like. yeah. use -r.


✨ OPTIONS ✨

these options can also be set in the /etc/systemd/bootchart.conf file. see bootchart.conf(5).

  • -h, --help β€” print a short help text and exit. the classic.
  • -n, --sample N β€” specify the number of samples, N, to record. samples will be recorded at intervals defined with --freq.
  • -f, --freq f β€” 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. don't be greedy okay πŸ’€
  • -r, --rel β€” use relative times instead of absolute times. this is useful for using bootchart at post-boot 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. she's giving polite and reasonable 🌸
  • -F, --no-filter β€” 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.001 s) will not be displayed in the output graph.
  • -C, --cmdline β€” display the full command line with arguments of processes, instead of only the process name. the whole tea β˜•
  • -g, --control-group β€” display process control group
  • -o, --output path β€” specify the output directory for the graphs. by default, bootchart writes the graphs to /run/log.
  • -i, --init path β€” use this init binary. defaults to /usr/lib/systemd/systemd.
  • -p, --pss β€” enable logging and graphing of processes' PSS (Proportional Set Size) memory consumption. see filesystems/proc.txt in the kernel documentation for an explanation of this field.
  • -e, --entropy β€” enable logging and graphing of the kernel random entropy pool size. chaos, but measured πŸ”₯
  • -x, --scale-x N β€” horizontal scaling factor for all variable graph components.
  • -y, --scale-y N β€” vertical scaling factor for all variable graph components.

πŸ’… OUTPUT πŸ’…

systemd-bootchart generates SVG graphs. in order to render those on a graphical display, any SVG capable viewer can be used. and 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. yes really. just point your browser at file:///run/log/! πŸŽ€


πŸ‘‘ HISTORY πŸ‘‘

this version of bootchart was implemented from scratch, but is inspired by former bootchart incantations:

Original bash

the original bash/shell code implemented bootchart. this version created a compressed tarball for processing with external applications. this version did not graph anything β€” only generated data. a humble beginning, we respect her 🫢

Ubuntu C Implementation

this version replaced the shell version with a fast and efficient data logger, but also did not graph the data.

Java bootchart

this was the original graphing application for charting the data, written in java.

pybootchartgui.py

pybootchart created a graph from the data collected by either the bash or C version.

the version of bootchart you are using now combines both the data collection and the charting into a single application, making it more efficient and simpler. there are no longer any timing issues with the data collector and the grapher, as the graphing cannot be run until the data has been collected. also, the data kept in memory is reduced to the absolute minimum needed. evolution. growth. character development. 🌈


πŸ” SEE ALSO πŸ”


πŸ’€ BUGS πŸ’€

systemd-bootchart does not get the model information for the hard drive unless the root device is specified with root=/dev/sdxY. using UUIDs or PARTUUIDs will boot fine, but the hard drive model will not be added to the chart. so close 😭

for bugs, please contact the author and current maintainer:

Auke Kok <auke-jan.h.kok@intel.com>

okay that's the whole page bestie!! no skips, no shortcuts, every single flag accounted for πŸ’–

and that's a wrap on this one, gorgeous β€” she's part of systemd 235, and this was the SYSTEMD-BOOTCHART(1) page. go forth and graph your boot, you absolute legend. πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from