In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "simple analysis of startup performance of Linux system". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "simple analysis of startup performance of Linux system".
Systemd-analyze is a tool for analyzing startup performance, which is used to analyze service time consumption at startup. The default shows that startup is the time consumed by the kernel and user space:
The code is as follows:
[root@localhost~] # systemd-analyze
Startupfinishedin818ms (kernel) + 6.240s (initrd) + 32.979s (userspace) = 40.038s
It has the same effect as using the systemd-analyzetime command.
(1) View the detailed startup time consumed by each service
View the detailed startup time consumed by each service through the systemd-analyzeblame command:
The code is as follows:
[root@localhost~] # systemd-analyzeblame
30.852siscsi.service
16.994skdump.service
10.871sboot.mount
...
103mssystemd-sysctl.service
101msdatapool.mount
(2) View the time-consuming service tree table
The systemd-analyzecritical-chain command prints a heavily time-consuming service tree, sorted by the time consumed by startup, and the more time is consumed, the more time comes first. @ is followed by the time the service is activated or started, and after the + sign, the time it takes to start the service. Personal understanding @ is the time from the system boot to the service startup, is a relative time consumption, + is the service startup time consumption, is an absolute time consumption.
The code is as follows:
[root@localhost~] # systemd-analyzecritical-chain
Thetimeaftertheunitisactiveorstartedisprintedafterthe "@" character.
Thetimetheunittakestostartisprintedafterthe "+" character.
Multi-user.target@32.976s
└─ kdump.service@15.981s+16.994s
└─ network.target@15.980s
└─ NetworkManager.service@15.069s+54ms
└─ firewalld.service@14.532s+535ms
└─ basic.target@14.532s
└─ sockets.target@14.532s
└─ dbus.socket@14.532s
└─ sysinit.target@14.527s
└─ systemd-update-utmp.service@14.524s+2ms
└─ systemd-tmpfiles-setup.service@14.456s+67ms
└─ local-fs.target@14.447s
└─ boot.mount@3.575s+10.871s
└─ systemd-fsck@dev-disk-by\ x2duuid-8c77568b\ x2d7e51\ x2d4e32\ x2dbbdf\ x2ddc12ff737bbf.service@3.348s+226ms
└─ systemd-fsck-root.service@1.237s+152ms
└─ systemd-readahead-replay.service@1.073s+25ms
(3) print analytical drawings and other commands
Systemd-analyzeplot prints a service consumption schedule in svg format, which can be displayed graphically through the browser, which is very intuitive:
The code is as follows:
[root@localhost~] # systemd-analyzeplot > plot.svg
Other parameters:
Systemd-analyzedot uses delimiters to generate the current service
Systemd-analyzedump displays the current service status in a friendly manner
6systemd file type and location
The systemd configuration file is called the unit unit and ends with a different extension depending on the type.
.service system service
.target A set of system services
.automount automatic mount point
A device that can be recognized by the kernel
.mount point
The file or directory of the .path file system
Processes created outside .scope
System process of .slice one-component hierarchical management
.snapshot system service status management
.socket interprocess communication socket
.swap defines a swap file or device
.timer defines a timer.
Thank you for reading, the above is the content of "simple analysis of startup performance of Linux system". After the study of this article, I believe you have a deeper understanding of the simple analysis of startup performance of Linux system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.