strace分析启动流程

Posted chinaops

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了strace分析启动流程相关的知识,希望对你有一定的参考价值。

strace -ttt /usr/local/mysql/bin/mysqld 2>&1 |tee 1.log

vi 1.log
1 1530183737.761709 execve("/usr/local/mysql/bin/mysqld", ["/usr/local/mys ql/bin/mysqld"], [/* 22 vars */]) = 0
2 1530183737.762769 brk(NULL) = 0x2c3e000
3 1530183737.763543 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP _ANONYMOUS, -1, 0) = 0x7f716b606000
4 1530183737.763959 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No suc h file or directory)
5 1530183737.765866 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
6 1530183737.766479 fstat(3, {st_mode=S_IFREG|0644, st_size=22349, ...}) = 0
7 1530183737.767560 mmap(NULL, 22349, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f 716b600000
8 1530183737.768290 close(3) = 0
9 1530183737.769406 open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 10 1530183737.769905 read(3, "177ELF2113>1 0m"..., 832) = 832
11 1530183737.770644 fstat(3, {st_mode=S_IFREG|0755, st_size=144792, ...}) = 0
12 1530183737.771407 mmap(NULL, 2208904, PROT_READ|PROT_EXEC, MAP_PRIVATE|M AP_DENYWRITE, 3, 0) = 0x7f716b1ca000
13 1530183737.772279 mprotect(0x7f716b1e1000, 2093056, PROT_NONE) = 0
14 1530183737.772600 mmap(0x7f716b3e0000, 8192, PROT_READ|PROT_WRITE, MAP_P RIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f716b3e0000
15 1530183737.772904 mmap(0x7f716b3e2000, 13448, PROT_READ|PROT_WRITE, MAP_ PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f716b3e2000
16 1530183737.773475 close(3) = 0
17 1530183737.773573 open("/lib64/libaio.so.1", O_RDONLY|O_CLOEXEC) = 3
@
:set nu
884 1530183738.120992 munmap(0x7f71629f9000, 618496) = 0
885 1530183738.121551 munmap(0x7f71625a3000, 4546560) = 0
886 1530183738.122458 munmap(0x7f71622d2000, 2953216) = 0
887 1530183738.123343 munmap(0x7f71633f7000, 1740800) = 0
888 1530183738.123870 munmap(0x7f7163360000, 618496) = 0
889 1530183738.124320 munmap(0x7f7162f0a000, 4546560) = 0
890 1530183738.125365 munmap(0x7f7162c39000, 2953216) = 0
891 1530183738.126431 munmap(0x7f71622b1000, 135168) = 0
892 1530183738.126840 munmap(0x7f7162290000, 135168) = 0
893 1530183738.127470 munmap(0x7f7161fcf000, 2887680) = 0
894 1530183738.127765 munmap(0x7f716b5b7000, 266240) = 0
895 1530183738.127946 munmap(0x7f7166480000, 954368) = 0
896 1530183738.128568 munmap(0x7f716612f000, 3477504) = 0
897 1530183738.129550 munmap(0x7f7166002000, 1232896) = 0
898 1530183738.129880 munmap(0x7f7165756000, 9093120) = 0
899 1530183738.130496 munmap(0x7f71651b5000, 5902336) = 0
900 1530183738.131440 munmap(0x7f7165146000, 454656) = 0
901 1530183738.131993 munmap(0x7f7165104000, 270336) = 0
902 1530183738.132568 munmap(0x7f7164d84000, 3670016) = 0
903 1530183738.133323 munmap(0x7f7164a04000, 3670016) = 0
904 1530183738.134206 munmap(0x7f716492c000, 884736) = 0
905 1530183738.134867 munmap(0x7f716490b000, 135168) = 0
906 1530183738.135377 munmap(0x7f716468a000, 2625536) = 0
907 1530183738.135896 munmap(0x7f7164409000, 2625536) = 0
908 1530183738.136930 munmap(0x7f7164188000, 2625536) = 0
909 1530183738.137692 munmap(0x7f7163f07000, 2625536) = 0
910 1530183738.138772 exit_group(1) = ?
911 1530183738.140112 +++ exited with 1 +++















































以上是关于strace分析启动流程的主要内容,如果未能解决你的问题,请参考以下文章

SpringBoot启动流程分析:SpringBoot自动装配原理实现

[Abp 源码分析] Abp 框架启动流程分析

SpringBoot启动流程分析:IoC容器的初始化过程

SpringBoot 高级 原理分析 -- SpringBoot启动流程分析

Linux系统启动流程分析与关机流程

springboot启动流程分析