[Ubuntu小技巧系列之四]系统启动优化之bootchart

Posted by c4pr1c3 on November 23, 2009

ubuntu已经9.10了,我懒得升了,还是9.04,感觉用得还是很顺手的。

1、预备工具 bootchart

$ sudo apt-get install bootchart

2、使用bootchart

安装完后重启系统,即会在/var/log/bootchart目录下生成系统启动过程的时序图我本本的启动时序图见本文最后。

3、禁用bootchart

注意:默认情况下,每次系统启动时bootchartd都会执行,并生成这样一个启动时序图。

禁止自动执行bootchartd的方法很简单,如下:

$ cd /etc/init.d

$ sudo update-rc.d -f stop-bootchart remove

Removing any system startup links for /etc/init.d/stop-bootchart …

/etc/rc2.d/S99stop-bootchart

/etc/rc3.d/S99stop-bootchart

/etc/rc4.d/S99stop-bootchart

/etc/rc5.d/S99stop-bootchart

4、启用bootchart

$ cd /etc/init.d

$ sudo update-rc.d stop-bootchart start 99 2 3 4 5 .

Adding system startup for /etc/init.d/stop-bootchart …

/etc/rc2.d/S99stop-bootchart -> ../init.d/stop-bootchart

/etc/rc3.d/S99stop-bootchart -> ../init.d/stop-bootchart

/etc/rc4.d/S99stop-bootchart -> ../init.d/stop-bootchart

/etc/rc5.d/S99stop-bootchart -> ../init.d/stop-bootchart