pmaports/main/bootchart2/30-disable-interactive-mode.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

34 lines
1.4 KiB
Diff

diff --git a/pybootchartgui/main.py.in b/pybootchartgui/main.py.in
index e809198..164fcf3 100644
--- a/pybootchartgui/main.py.in
+++ b/pybootchartgui/main.py.in
@@ -30,8 +30,10 @@ def _mk_options_parser():
usage = "%prog [options] PATH, ..., PATH"
version = "%prog v@VER@"
parser = optparse.OptionParser(usage, version=version)
- parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False,
- help="start in active mode")
+ # PostmarketOS: Remove interactive mode. gui.py would need changes for compatibility
+ # with the py3-gobject3 package.
+ # parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False,
+ # help="start in active mode")
parser.add_option("-f", "--format", dest="format", default="png", choices=["png", "svg", "pdf"],
help="image format (png, svg, pdf); default format png")
parser.add_option("-o", "--output", dest="output", metavar="PATH", default=None,
@@ -123,10 +125,12 @@ def main(argv=None):
trace = parsing.Trace(writer, args, options)
- if options.interactive:
- from . import gui
- gui.show(trace, options)
- elif options.boottime:
+ # PostmarketOS: Remove interactive mode
+ # if options.interactive:
+ # from . import gui
+ # gui.show(trace, options)
+ #elif options.boottime:
+ if options.boottime:
import math
proc_tree = trace.proc_tree
if proc_tree.idle: