Tiny Core Base > Micro Core

timing partial booting from tc-config?

<< < (2/3) > >>

curaga:
With printk.time=1 in bootcodes, you will know exactly when each modprobe call and similar happened. To time other arbitrary parts of tc-config you can insert calls to logger IIRC.

nick65go:
"can insert calls to logger IIRC" ? I do not know how to do it.in the mean time I reinvented the wheel, again, using repeating similar code like
--- Code: ---echo timer=`cat /proc/uptime` used sec. [6] Finish USB detection >> /tmp/timer.lst
--- End code ---
because virgin core.gz boot too fast (4 seconds in qemu), i simulated without "accel=kvm" so see the impact of tc-config sections.
now the boot time is 126 seconds, so i can see where there are the "possible" bottle-necks.Snapshot are attached, taken with grabber.tcz
summary: near 17% (=21/126) used before tc-config start,  51% [=80-29)/126] for zRAM

Rich:
Hi nick65go

--- Quote from: nick65go on August 16, 2020, 05:41:51 PM ---"can insert calls to logger IIRC" ? I do not know how to do it. ...
--- End quote ---
Add the boot code  syslog  to your bootloaders config file. Then add a time stamped message like this:

--- Code: ---logger [6] Finish USB detection
--- End code ---
Your message will show up in:

--- Code: ---/var/log/messages
--- End code ---
if that file filled up, the earlier messages will be in:

--- Code: ---/var/log/messages.0
--- End code ---

nick65go:
Hi Rich,The boot code "syslog" is not so usefully, because it starts later in the "middle" of tc-config.
So, if you (download and) look into my previous attachment, you wiill see something like section

--- Code: ---[10] Finish starting hostname, syslog + klog
--- End code ---
my demo is fully reproducible, if you want, I attached the "original" tc-config, with just my timers inserted. so it was about "28 sections".Anyway, thanks for your explanation, it can be useful to me in few other cases to try it.

Greg Erskine:
Hi nick65go,

I use this command in startup scripts to write messages to dmesg.

$ sudo su -c 'echo "Starting xxxx." > /dev/kmsg'

The timestamping is automatic and it shows you when it is happening compared with the other startup processes.

I don't know if it is better than what you are doing, just another option.

regards
Greg

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version