systemd-analyze is an analyser and toolkit to help with tuning the system for performance and security
The simplest form of the systemd-analyze command displays an overview of the amount of time spent in each of the main sections of startup, the kernel startup, loading and running initrd (i.e., initial ramdisk, a temporary system image that is used to initialize some hardware and mount the / [root] filesystem), and userspace (login).
blame
# systemd-analyze blame
blame shows systemd unit timing information ordered by duration (longest first). Helps determine why the boot sequence takes a specific amount of time.
cat-config
# systemd-analyze cat-config systemd/system/display-manager.service
The systemd-analyze tool provides a way to send the contents of various configuration files to STDOUT, as shown here. The base directory is /etc/:
verify (Unit file verification)
# systemd-analyze verify /etc/systemd/system/<new_unit>.service
After creating a new unit file, it can be helpful to verify that its syntax is correct
security
# systemd-analyze security display-manager
The security subcommand checks the security level of specified services. It only works only on service units
Others
# systemctl cat ssh*
# systemd-analyze plot > /tmp/bootup_diagram.svg
No comments:
Post a Comment