pmaports/main/bootchart2/10-set-EXIT_PROC.patch
Pops Dylan e068de2de5
main/bootchart2: new aport (!852)
Port bootchart2 to PostmarketOS, with three patches:
1. Modification of /etc/bootchartd.conf so that the collector
will stop after sshd has started.
2. Python 3.8 compatibility
3. Disable the interactive mode of pybootchartgui.

Use bootchart2 to profile system boot or a running system.
1. Add the bootchart2 package to your device.
2. Add the following kernel command line parameters: initcall_debug
printk.time=y quiet
3. To profile system boot
	a. add the following kernel command line parameter: PMOS_BOOTCHART2.
	This parameter causes mkinitfs to start /sbin/bootchartd instead of
	/sbin/init. /sbin/bootchartd then starts /sbin/init.
	b. (optional) modify EXIT_PROC in /etc/bootchartd.conf to define
	when the collector is to stop.
	c. Boot the system. Approximately 20 seconds after sshd starts
	(if using the default value of EXIT_PROC), the collector
	will exit.
4. To profile a running system
	a. use the command '/sbin/bootchartd start' (as root) to start
	profiling
	b. use the command '/sbin/bootchartd stop' (as root) to stop
	profiling
5. When the collector exits, /usr/bin/pybootchartgui will create
a visualization in /var/log/bootchart.png.
2020-01-13 15:43:00 +03:00

52 lines
1.1 KiB
Diff

diff --git a/bootchartd.conf b/bootchartd.conf
index 7c45cb5..9599451 100644
--- a/bootchartd.conf
+++ b/bootchartd.conf
@@ -30,19 +30,4 @@ AUTO_RENDER_DIR="/var/log"
CUSTOM_POST_CMD=""
# The processes we have to wait for
-EXIT_PROC="compiz \
- enlightenment \
- fluxbox \
- gnome-shell \
- gnome-terminal \
- icewm-session \
- kdm_greet \
- konsole \
- ldm \
- lightdm-gtk-greeter \
- metacity \
- mutter \
- openbox \
- sddm-helper \
- xfwm4 \
- xterm"
+EXIT_PROC="sshd"
diff --git a/bootchartd.in b/bootchartd.in
index 7979ef9..d1709eb 100755
--- a/bootchartd.in
+++ b/bootchartd.in
@@ -43,21 +43,7 @@ AUTO_RENDER_DIR="/var/log"
AUTO_RENDER_FORMAT="png"
# The processes we have to wait for
-EXIT_PROC="compiz \
- enlightenment \
- fluxbox \
- gnome-shell \
- gnome-terminal \
- icewm-session \
- kdm_greet \
- konsole \
- ldm \
- lightdm-gtk-greeter \
- metacity \
- mutter \
- openbox \
- xfwm4 \
- xterm"
+EXIT_PROC="sshd"
# Read configuration.
CONFBASE="${PROGRAM_PREFIX}bootchartd${PROGRAM_SUFFIX}"