Getting Bootchart setup on Debian 8.3

282 views
Skip to first unread message

Jean-Sebastien Stoezel

unread,
May 9, 2016, 8:52:17 AM5/9/16
to BeagleBoard
Hi:

I would like to reduce the boot time of my BBB/BBG, running Debian 8.3. While I was able to find related posts on this forum, they seem old-ish and I wasn't able to implement what they suggested.

The first advice was to install Bootchart, which seems to be pre-installed on the Debian 8.3 I am running. What I can't seem to be able to do is setup Bootchart to actually collect data.
The information I found online suggests modifying /boot/uEnv.txt to include

systemd=quiet init=/sbin/bootchartd 

But this still didn't seem to enable Bootchart (i.e. no /var/log/bootchart.tgz file generated).

Would anybody have updated instructions on how to setup Bootchart with systemd and Debian 8.3?

Regards,
JS

Robert Nelson

unread,
May 9, 2016, 9:25:38 AM5/9/16
to Beagle Board
systemd-analyze plot > file.svg

Regards,

--
Robert Nelson
https://rcn-ee.com/

Micka

unread,
May 9, 2016, 9:33:47 AM5/9/16
to Beagle Board
Thank you Robert !

networking.service (18.800s) 
generic-board-startup.service (6.242s)  

lol  

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgFZjxUhLu9UMDb7Ncj7JQvk4XGjeQsZJV7m6U39TgAXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
May 9, 2016, 9:38:45 AM5/9/16
to Beagle Board
On Mon, May 9, 2016 at 8:33 AM, Micka <micka...@gmail.com> wrote:
Thank you Robert !

networking.service (18.800s) 
generic-board-startup.service (6.242s)  

This hits the board eeprom over i2c, along with a module load, fires up udhpc and finally an overlay load..

Regards,

Micka

unread,
May 9, 2016, 10:39:18 AM5/9/16
to Beagle Board
yes sorry, 

I know that It does a lot of thing, and it tooks a lot of time ^^ .

I will have to dig into it .



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
May 9, 2016, 10:42:37 AM5/9/16
to Beagle Board
On Mon, May 9, 2016 at 9:38 AM, Micka <micka...@gmail.com> wrote:
yes sorry, 

I know that It does a lot of thing, and it tooks a lot of time ^^ .

I will have to dig into it .

Yeah, i'd like to cut it down in time. ;)

Regards,

Micka

unread,
May 9, 2016, 11:01:09 AM5/9/16
to Beagle Board
Robert,

Which service is calling the script /opt/scripts/boot/am335x_evm.sh ?

  bonescript-autorun.service   
  bonescript.service  
  capemgr.service            



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
May 9, 2016, 11:03:48 AM5/9/16
to Beagle Board
On Mon, May 9, 2016 at 10:00 AM, Micka <micka...@gmail.com> wrote:
Robert,

Which service is calling the script /opt/scripts/boot/am335x_evm.sh ?

generic-board-startup.service ->

/opt/scripts/boot/generic-startup.sh ->

/opt/scripts/boot/am335x_evm.sh

Regards,

William Hermans

unread,
May 9, 2016, 6:26:23 PM5/9/16
to beagl...@googlegroups.com

Startup finished in 3.159s (kernel) + 7.910s (userspace) = 11.069s

*cough*Raspbian GNU/Linux 8 (jessie) rpi (Linux 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016) arm*cough*

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Micka

unread,
May 9, 2016, 6:29:10 PM5/9/16
to beagl...@googlegroups.com
The problem comes from the network .... I will look into that tomorrow.

William Hermans

unread,
May 9, 2016, 6:29:26 PM5/9/16
to beagl...@googlegroups.com
@Robert,

By the way, I'm curious what's holding back the BBB's boot up in jessie ? I remember it used to be every bit as snappy as the above stats listed for my rpi 3. Except the BBB didn't have, or even need quad cores . . .

Micka

unread,
May 10, 2016, 4:33:20 AM5/10/16
to beagl...@googlegroups.com
Robert Nelson,

If I'm not wrong in the file /etc/init.d/networking 

The line that take a lot of time is : udevadm settle

      Watches the udev event queue, and exits if all current events are
       handled.

That where we wait for a long long time !


John Baker

unread,
May 18, 2016, 5:53:24 PM5/18/16
to BeagleBoard
Robert:
What script is trying to read the clock data from ntp? I have an Adafruit DS3231 for the Real Time Clock and the BBB is taking a minute before it gets the clock from the DS3231 so I suspect some script is trying to read the ntp clock data and holding up the read of my DS3231 clock. Es posible?
John

Micka

unread,
May 18, 2016, 11:34:31 PM5/18/16
to BeagleBoard
sudo apt-get remove ntp

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
May 18, 2016, 11:48:26 PM5/18/16
to beagl...@googlegroups.com
the ntp serviced use with debian is actually ntpdate.

Robert Nelson

unread,
May 19, 2016, 12:31:02 AM5/19/16
to Beagle Board, bakerengi...@gmail.com


On May 18, 2016 4:53 PM, "John Baker" <bakerengi...@gmail.com> wrote:
>
> Robert:
> What script is trying to read the clock data from ntp? I have an Adafruit DS3231 for the Real Time Clock and the BBB is taking a minute before it gets the clock from the DS3231 so I suspect some script is trying to read the ntp clock data and holding up the read of my DS3231 clock. Es posible?

In Jessie..

systemd-timesyncd

Is setup by default.

Regards,

John Baker

unread,
May 19, 2016, 7:27:50 AM5/19/16
to beagl...@googlegroups.com, bakerengi...@gmail.com

Thanks Micka.

I just now tried that and putty.exe said that ntp isn't installed, so not removed, but I'll bet it's gotta be something like that. Maybe something for the Internet connection.

John

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rtn0sS_z9DA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtk%3DQWMYfn_4Ox9gGox9HYjtPC8Z7HTNbKESAevfEseYEA%40mail.gmail.com.

Micka

unread,
May 19, 2016, 8:08:51 AM5/19/16
to beagl...@googlegroups.com, bakerengi...@gmail.com
As Robert told u, you need to disable the service
systemd-timesyncd:

systemctl disable systemd-timesyncd

John Baker

unread,
May 19, 2016, 1:33:09 PM5/19/16
to BeagleBoard, bakerengi...@gmail.com
My apologies to All: I'm an interloper. Actually I'm using Debian Wheezy and my problem is not related to bootchart. I hitched onto this thread, suggested by Drew Fustini in the Adafruit forum. 

I have an Adafruit DS3231 Real Time Clock module attached to my BBB. Debian is delaying for one minute to read the DS3231's clock time and I would like to eliminate that one minute delay. I suspect that Debian is trying to go through the Internet to read the time from ntpdate or whatever and gives up after a minute, finally reading the clock data from the DS3231 module.

FWIW, I checked the status of the systemd-timesyncd service and found that it's "inactive (dead)."

Thanks,
John

William Hermans

unread,
May 19, 2016, 1:48:16 PM5/19/16
to beagl...@googlegroups.com
My apologies to All: I'm an interloper. Actually I'm using Debian Wheezy and my problem is not related to bootchart. I hitched onto this thread, suggested by Drew Fustini in the Adafruit forum. 

I have an Adafruit DS3231 Real Time Clock module attached to my BBB. Debian is delaying for one minute to read the DS3231's clock time and I would like to eliminate that one minute delay. I suspect that Debian is trying to go through the Internet to read the time from ntpdate or whatever and gives up after a minute, finally reading the clock data from the DS3231 module.

FWIW, I checked the status of the systemd-timesyncd service and found that it's "inactive (dead)."

Thanks,
John

John,

Maybe helpful for you, maybe not. But you could look into the wheezy package fake-hwclock, which keeps time as close as possible to accurate time between reboots. Which would then make that one minute delay at least bearable.

The problem I'm thinking you're running into here is that it takes a while for the OS to come up. So until the system is read to take care of reading the real time clock . . .

Perhaps you could find, or write a kernel module that loads time from the rtc at early boot ? But non of this is anything I'v personally had hands on with, except fake-hwclock.

Micka

unread,
Jun 29, 2016, 6:45:09 AM6/29/16
to beagl...@googlegroups.com
Robert Nelson,

About the service  /etc/init.d/networking

did you modify it for the beaglebone black ?

Because we know that the BBB have problem with ethernet. But where did you try to correct the problem ? In the networking service ? Did you put a sleep ?

Where can I reduce the time of the execution of this service ? 


micka,

William Hermans

unread,
Jun 29, 2016, 10:58:03 AM6/29/16
to beagl...@googlegroups.com
Robert Nelson,

About the service  /etc/init.d/networking

did you modify it for the beaglebone black ?

Because we know that the BBB have problem with ethernet. But where did you try to correct the problem ? In the networking service ? Did you put a sleep ?

Where can I reduce the time of the execution of this service ?


micka,


Yes, 14 seconds is too long to spend on a service of this nature. Especially considering that here, I use a static IP, and it should spend 0 seconds waiting on the service.

As far as I can tell there is no way to change this. I spent a few hours googling around, and experimenting with a few things, and none worked . . .

Robert Nelson

unread,
Jun 29, 2016, 11:00:28 AM6/29/16
to Beagle Board
On Wed, Jun 29, 2016 at 5:44 AM, Micka <micka...@gmail.com> wrote:
> Robert Nelson,
>
> About the service /etc/init.d/networking
>
> did you modify it for the beaglebone black ?
>
> Because we know that the BBB have problem with ethernet. But where did you
> try to correct the problem ? In the networking service ? Did you put a sleep
> ?
>
> Where can I reduce the time of the execution of this service ?

I didn't make any changes to that script...

it's slow, specially if your eth0 isn't connected..

thus we use connman ;)

William Hermans

unread,
Jun 29, 2016, 11:20:15 AM6/29/16
to beagl...@googlegroups.com
Robert,

I have the same problem, eth0 connected to a GbE switch, into our network, and eth0 set statically in /etc/network/interfaces. I even with your most recently released image changed out systemd for sysv, thinking that maybe it would make a little difference. But it changed nothing.

All those posts on Archlinux I've found were people had the same problem discussed a service file and a Settimeout
 variable. But I could not found this variable in any of the networking.service files for systemd on this image . . . but also some discussed if this variable is set too low, it'll cause the system to wait even longer . . . so yeah I do not know.

Anyway, I'd prefer not to use connman . . . but I would like this problem fixed. And this is a recent development. As in it's a Jessie thing . . .

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
Jun 29, 2016, 11:22:49 AM6/29/16
to Beagle Board
On Wed, Jun 29, 2016 at 10:20 AM, William Hermans <yyr...@gmail.com> wrote:
> Robert,
>
> I have the same problem, eth0 connected to a GbE switch, into our network,
> and eth0 set statically in /etc/network/interfaces. I even with your most
> recently released image changed out systemd for sysv, thinking that maybe it
> would make a little difference. But it changed nothing.
>
> All those posts on Archlinux I've found were people had the same problem
> discussed a service file and a Settimeout
> variable. But I could not found this variable in any of the
> networking.service files for systemd on this image . . . but also some
> discussed if this variable is set too low, it'll cause the system to wait
> even longer . . . so yeah I do not know.
>
> Anyway, I'd prefer not to use connman . . . but I would like this problem
> fixed. And this is a recent development. As in it's a Jessie thing . . .

it's a debian and ubuntu thing..

Somewhere along the line, someone decided that if you had any entries
in /etc/network/interfaces, that 'should' be up before the login
prompt appears..

atleast they added a 2 minute time out..

Micka

unread,
Jun 29, 2016, 11:23:55 AM6/29/16
to Beagle Board
The ethernet is connected.

I've put some log in the file /etc/init.d/networking . And this file work very quickly. Weird ... Looks like that systemd takes time to detect that the service finished.


[   11.213262] net eth0: initializing cpsw version 1.12 (0)
[   11.215589] net eth0: phy found : id is : 0x7c0f1
[   11.231729] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[  117.675769] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

but for some reason, it takes too much time !

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Jun 29, 2016, 11:38:18 AM6/29/16
to beagl...@googlegroups.com
Robert,

Any idea where I should start looking to resolve this problem ? I would not mind hunting the problem down myself, and then giving the group the information.

Micka

unread,
Jun 29, 2016, 11:49:40 AM6/29/16
to beagl...@googlegroups.com
I found the answer here : 

http://unix.stackexchange.com/questions/204753/systemd-waiting-too-long-for-network-at-debian-8-0-jessies-boot

The solution is fairly easy, just replace auto to allow-hotplug. 

now it takes:  networking.service (4.113s) 

William Hermans

unread,
Jun 29, 2016, 11:51:29 AM6/29/16
to beagl...@googlegroups.com
I found the answer here :

http://unix.stackexchange.com/questions/204753/systemd-waiting-too-long-for-network-at-debian-8-0-jessies-boot

The solution is fairly easy, just replace auto to allow-hotplug.

now it takes:  networking.service (4.113s)

I tried that about a week ago. It did not work for me. But I only tried with systemd not sysv.

Micka

unread,
Jun 29, 2016, 11:53:06 AM6/29/16
to beagl...@googlegroups.com
Did you put allow-hotplug everywhere ?

Micka

unread,
Jun 29, 2016, 11:56:57 AM6/29/16
to beagl...@googlegroups.com
allow-hotplug lo
allow-hotplug eth0


William Hermans

unread,
Jun 29, 2016, 11:57:33 AM6/29/16
to beagl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages