The systemd-analyze tool requires that all boot services are completed before the tool can be run successfully. If there are still outstanding services active, then the following error will be returned:
root@yocto-platform1:~# systemd-analyze Bootup is not yet finished. Please try again later.
To find out what services are still active, the systemctl list-jobs command can be used, e.g.
root@yocto-platform1:~# systemctl list-jobs JOB UNIT TYPE STATE 1 multi-user.target start waiting 102 rsync-appdatas.service start running 82 sync-rtc-to-sys-clock.service start running 83 systemd-update-utmp-runlevel.service start waiting 4 jobs listed.
These services can then be stopped as required:
root@yocto-platform1:~# systemctl stop rsync-appdatas
A service which has not compete at start-up will need to be investigated. Once possible cause the the mis-configuration of a custom service which is started at boot time, and is expected to behave as a traditional unix daemon by running continuously after boot has completed. For these types of services they should be configured as Type=forking. See here for further details (don’t forget to add the creation of a PIDFile): https://www.freedesktop.org/software/systemd/man/systemd.service.html