To determine how much time systemd took to reach the getty.target during system boot, you can use the systemd-analyze tool, which provides detailed timing information about the boot process.
✅ Step-by-step: Check Time Until getty.target is Reached
1. Use systemd-analyze with blame and filter for getty.target
bash
systemd-analyze | grep 'getty.target'
This may show something like:
code
Startup finished in 2.542s (kernel) + 3.123s (userspace) = 5.665s
+3.012s getty.target reached after 5.530s in userspace
Here, getty.target was reached 5.530 seconds after the beginning of userspace boot.
2. More precise method using show command
You can query the exact timestamps using:
bash
systemctl show -p ActiveEnterTimestamp,getty.target
Example output:
code
ActiveEnterTimestamp=Mon 2025-04-05 10:00:12 UTC
Now compare this timestamp with the kernel start time:
bash
journalctl -b --list-boots
Then find the exact boot time:
bash
systemd-analyze
Or:
bash
journalctl -b -1 | head -n 20
Look for a line like:
code
[ 0.000000] Linux version ...
That’s the kernel start time.
3. Calculate Difference Manually (Optional)
If you want to calculate the exact duration from boot until getty.target is reached:
bash
journalctl -b -u getty.target
Look for lines like:
code
Started Getty on tty1.
And check when it was started relative to boot time.
Alternatively:
bash
systemd-analyze plot > boot-time.svg
Open the SVG file in a browser or image viewer to visually inspect the timeline and see when getty.target was reached.
✅ TL;DR – Quick Command
To directly get the time when getty.target was reached:
bash
systemctl show -p ActiveEnterTimestamp getty.target
Output example:
code
ActiveEnterTimestamp=Mon 2025-04-05 10:00:12 UTC
Compare that with your system's boot time:
bash
who -b
Output example:
code
system boot 2025-04-05 10:00:06
So:
code
10:00:12 - 10:00:06 = 6 seconds
Let me know if you'd like a script to automate this!