BootChart

 Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart. 

"The challenge is to create a single poster showing graphically what is going on during the boot, what is the utilization of resources, how the current boot differs from the ideal world of 100% disk and CPU utilization, and thus, where are the opportunities for optimization."  

Bootchart provides a shell script to be run by the kernel in the init phase. The script will run in background and collect process information, CPU statistics and disk usage statistics from the /proc file system. The performance data are stored in memory and are written to disk once the boot process completes.

The boot log file is later processed using a Java application (or the web form) which builds the process tree and renders a performance chart in different formats: 

The chart can then be analyzed to examine process dependency and overall resource utilization

 

编译bootchart.jar 

jackie_gnu@host:~/test/bootchart/bootchart-0.9$ ant
Buildfile: build.xml

prepare:
    [mkdir] Created dir: /home/jackie_gnu/test/bootchart/bootchart-0.9/build

classes:
    [javac] Compiling 28 source files to /home/jackie_gnu/test/bootchart/bootchart-0.9/build
    [javac] Note: /home/jackie_gnu/test/bootchart/bootchart-0.9/lib/org/apache/commons/cli/TypeHandler.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] Compiling 26 source files to /home/jackie_gnu/test/bootchart/bootchart-0.9/build
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar:
      [jar] Building jar: /home/jackie_gnu/test/bootchart/bootchart-0.9/bootchart.jar

javadoc:
    [mkdir] Created dir: /home/jackie_gnu/test/bootchart/bootchart-0.9/javadoc/api
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package org.bootchart...
  [javadoc] Loading source files for package org.bootchart.common...
  [javadoc] Loading source files for package org.bootchart.parser...
  [javadoc] Loading source files for package org.bootchart.parser.linux...
  [javadoc] Loading source files for package org.bootchart.renderer...
  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.6.0_18
  [javadoc] Building tree for all the packages and classes...
  [javadoc] Building index for all the packages and classes...
  [javadoc] Building index for all classes...

all:

BUILD SUCCESSFUL
Total time: 9 seconds

 

生成bootchart.png

java -jar bootchar.jar example/bootchart.tgz bootchart.png


 

 

    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值