AI Crawler · Collection Records

Bot summary · Last 24 hours

systemd-analyze — boot and service analysis

Analyzes and visualizes systemd boot time and service startup order and dependencies.
Markdown source·Anything to add or correct?

💬 "systemd-analyze command"

systemd-analyze is a tool for boot and service analysis that analyzes and visualizes systemd boot time and service startup order/dependencies.

It measures boot time (firmware→userspace). It provides a ranking (blame) of startup time per service.

  • Concept: Measures boot time (firmware→userspace).
  • Key Features: Provides a ranking (blame) of startup time per service.
  • Advantages: Visualizes dependency graphs as SVG.
  • Usage: Tracks bottlenecks with critical-chain.

Installation and Download

systemd-analyze is installed via a package manager or an official script.

EnvironmentCommand
Built-in with systemdsystemd-analyze
Check boot timesystemd-analyze
Service rankingsystemd-analyze blame
Generate graphsystemd-analyze plot > boot.svg
Verifysystemd-analyze --version

Verify the installation with systemd-analyze --version.

Frequently Used Options

OptionDescription
systemd-analyzeTotal boot time
systemd-analyze blameStartup time ranking per service
systemd-analyze critical-chainDependency bottleneck chain
systemd-analyze plot > boot.svgBoot visualization SVG
systemd-analyze timekernel→init→userspace breakdown

3 Essential Command Combinations

  • systemd-analyze critical-chain — Track the slowest dependency chain
  • systemd-analyze blame | head -10 — Top 10 slowest services
  • systemd-analyze plot > boot.svg — Full visualization

💬 "Show me an example of using systemd-analyze on a real server"

Here is a step-by-step guide to situations you frequently encounter on a production server.

Step 1: Check Boot Time

Check the total boot time.


systemd-analyze

Step 2: Slow Services

Identify the top 5 slowest services.


systemd-analyze blame | head -5

Step 3: Track Bottlenecks

Track dependency bottlenecks.


systemd-analyze critical-chain

Actual Execution Screen

This is the result of checking boot time and blame using systemd-analyze.

!systemd-analyze command execution result

Production server in operation

How It's Used in Practice

1. Tracking Boot Bottlenecks

Situation — You need to find the cause of slow boot.


systemd-analyze critical-chain

Result — You can see that NetworkManager-wait-online is consuming 1.4 seconds.

Key Point — Following the dependency chain reveals the bottleneck service.

2. Checking Service Ranking

Situation — You want to identify the slowest service.


systemd-analyze blame | head -5

Result — Services are slow in the order: nginx, postgresql, docker.

Key Point — The blame time only measures the service's execution time.

Actual Execution Screen

This is the result of tracking bottlenecks using systemd-analyze critical-chain.

!systemd-analyze command execution result 2

Production server in operation

Points to Note

  • The plot command generates an SVG file. On a server, you can download it using scp to view it.
  • The blame time only measures the service's execution time. Check dependency waiting time with critical-chain.
  • Boot time varies depending on hardware and instance type. Compare within the same instance type.

Source (HTML): https://games.aidebatehub.com/programs/linux/services/systemd-analyze.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:31:00+09:00