Bug 66926 - RFE: a command to figure out if boot up has been completed or not
Summary: RFE: a command to figure out if boot up has been completed or not
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-15 13:20 UTC by Umut Tezduyar
Modified: 2014-06-25 10:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Umut Tezduyar 2013-07-15 13:20:59 UTC
There is no easy polling way to determine if system has booted up or not. 

while (systemctl is-active default.target == false)
   print "Still booting.."

systemctl list-jobs can be used to figure out if there are jobs left or not but the output of systemctl list-jobs is for humans. One thing could be printing out the number of ongoing jobs with "--quit" option..

ex: systemctl --quit list-jobs; echo $? > 0

Note: Yes, I am aware of the Manager interface's dbus signal sent out when boot up is completed.
Comment 1 Lennart Poettering 2014-06-25 10:23:50 UTC
We have a global system state now which "systemctl status" without parameters shows now.

You can also dump it like this:

systemctl show -p SystemState

If it is shown as "running" then the system is fully started up. This should cover what is necessary.
Comment 2 Lennart Poettering 2014-06-25 10:32:05 UTC
A well, I also added a high-level "systemctl is-system-running" command for this now to git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.