惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Webroot Blog
Webroot Blog
U
Unit 42
A
About on SuperTechFans
宝玉的分享
宝玉的分享
月光博客
月光博客
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Securelist
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Spread Privacy
Spread Privacy
L
Lohrmann on Cybersecurity
Apple Machine Learning Research
Apple Machine Learning Research
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
B
Blog
I
Intezer
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
V
V2EX
L
LangChain Blog
AI
AI
G
GRAHAM CLULEY
T
Tor Project blog
人人都是产品经理
人人都是产品经理
D
Docker
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
I
InfoQ
Y
Y Combinator Blog
C
Comments on: Blog
GbyAI
GbyAI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
H
Help Net Security
Vercel News
Vercel News
T
Tenable Blog
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿

博客园 - 于光远

泛型编程 分区理论知识整理 SPI协议及驱动开发框架 I2C协议及驱动开发框架 使用qemu 加载linux-6.18.1内核 linux 内核 策略模式 单例模式 Linux性能分析:从监控到优化的完整工具链 C++模板元编程实现序列化与反序列化 引用 linux 脚本打印时间 接口编程 不定参数解析,结合tuple 独立于main运行的程序 类模板继承 std::ostream & operator<< Flash HIDL --HelloWorld
bootchart
于光远 · 2022-08-03 · via 博客园 - 于光远

bootchart 工具下载地址

https://sourceforge.net/projects/bootchart/

bootchart-lite 下载地址:

备注:该工具百度上基本上都不可用,但在github上能找到。有的时候不能只依赖百度,可以去github等仓库上找想要的资源。

https://github.com/cfsghost/bootchart-lite

一 编译bootchart-lite

  • 使用gcc/ 交叉编译工具链 直接编译bootchart-lite/src 下的bootchart-lite.c

  •  将可执行程序bootchart-lite放到/sbin 目录下
  •  新版本的Linux内核需要自己写system下的服务/etc/systemed/system

[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

  • 在/etc目标下创建rc.local文件
  • systemctl enable rc-local.service 使能服务

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