grab-bootchart.sh revision 4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53
1#!/bin/sh
2#
3# this script is used to retrieve the bootchart log generated
4# by init when compiled with INIT_BOOTCHART=true.
5#
6# for all details, see //device/system/init/README.BOOTCHART
7#
8TMPDIR=/tmp/android-bootchart
9rm -rf $TMPDIR
10mkdir -p $TMPDIR
11
12LOGROOT=/tmp/bootchart
13TARBALL=bootchart.tgz
14
15FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct"
16
17for f in $FILES; do
18    adb pull $LOGROOT/$f $TMPDIR/$f &> /dev/null
19done
20(cd $TMPDIR && tar -czf $TARBALL $FILES)
21cp -f $TMPDIR/$TARBALL ./$TARBALL
22echo "look at $TARBALL"
23