























bootchart 工具下载地址
https://sourceforge.net/projects/bootchart/
bootchart-lite 下载地址:
备注:该工具百度上基本上都不可用,但在github上能找到。有的时候不能只依赖百度,可以去github等仓库上找想要的资源。
https://github.com/cfsghost/bootchart-lite
一 编译bootchart-lite



[Unit] Description=/etc/rc.local Compatibility ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target
View Code

bootchart-lite在执行时会在/etc/bootchart-lite 目录下生成log文件。
但是文件夹不会自动生成,需要手动建立 sudo mkdir /etc/bootchart-lite。再加上777权限。
参考:
https://blog.csdn.net/qq_36813351/article/details/118883376?spm=1001.2014.3001.5502
二 使用 bootchart 工具
bootchart分析工具的使用:
1.安装Linux的java环境,并配置环境变量
2.安装ant,sudo apt-get install ant
3.安装bootchart,先将代码解压,执行安装脚本sudo ./install.sh,执行ant ,生成bootchart.jar工具
4.将/etc/bootchart-lite下的log 打包,tar czf bootchart.tgz *.log
5.调用工具 sudo java -jar ~/work/tools/bootchart-0.9/bootchart.jar bootchart.tgz


--------
ygy@ygy-VirtualBox:~/work/tools/bootchart-0.9$ ant
Buildfile: /home/ygy/work/tools/bootchart-0.9/build.xml

----------
另外虚拟机直接下载和使用(先记录一下,后面用到的话再仔细研究一下)
ygy@ygy-VirtualBox:~$ sudo apt install systemd-bootchart
sudo /lib/systemd/systemd-bootchart -r

/etc/systemd$ cat bootchart.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See bootchart.conf(5) for details.
[Bootchart]
#Samples=500
#Frequency=25
#Relative=no
#Filter=yes
#Output=<folder name, defaults to /run/log>
#Init=/path/to/init-binary
#PlotMemoryUsage=no
#PlotEntropyGraph=no
#ScaleX=100
#ScaleY=20
#ControlGroup=no
#PerCPU=no
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。