1 简介
2 BootChart使用步骤
(1)在主机上安装BootChart;
$sudo apt-get install bootchart。
(2)建立支持BootChart的init文件;
$touch system/core/init/init.c
$m INIT_BOOTCHART=true
将生成更新的ramdisk.img。
(3)安装init到手机系统;
将ramdisk.img烧写到手机。
(4)启动BootChart功能;
(5)收集系统产生的数据;
重启机器,数据会自动收集到/data/bootchart目录中
head,kernel_pacct,proc_diskstats.log,proc_ps.log,proc_stat.log。
adb pull /data/bootchart ./tmp目录,进入tmp目录 tar czf bootchart.tgz *。
(6)根据数据产生图表;
$ bootchart bootchart.tgz生成图表。
(7)结果分析。
图表上部为CPU和disk的使用情况,从左到右是时间轴,下方是各进程的运行状态条,显示各进程的开始时间和结束时间以及对应cpu和I/O利用情况。