Oct 4, 2009

Monitor your boot with 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.

To install botchart type in console: sudo apt-get install bootchart

Bootchart collects various statistics from /proc utilising a shell script which collects the info. After the next boot you will find detailed performance chart created by java application showing your boot in /var/log/bootchart directory and also a tarball containing logs.

The only thing I don't like about bootchart is, that after some time you will find a lot of logs and images in the bootchart folder while there is no script to delet them after some time. We can fix this by creating a cron job:

At first use your favourite editor to edit crontab:

To edit crontab with nano:
sudo crontab -e

To edit crontab with vi:
export EDITOR=vi; sudo crontab -e

Add this line to root crontab if you want to delete files older than 30 days:
@reboot /usr/bin/find /var/log/bootchart -type f -mtime +30 -exec rm {} \;
To find out more about bootchart - check the bootchart web at http://www.bootchart.org/

No comments:

Post a Comment