| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 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 | # | 
 | 8 | TMPDIR=/tmp/android-bootchart | 
 | 9 | rm -rf $TMPDIR | 
 | 10 | mkdir -p $TMPDIR | 
 | 11 |  | 
 | 12 | LOGROOT=/data/bootchart | 
 | 13 | TARBALL=bootchart.tgz | 
 | 14 |  | 
 | 15 | FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct" | 
 | 16 |  | 
 | 17 | for f in $FILES; do | 
 | 18 |     adb pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null | 
 | 19 | done | 
 | 20 | (cd $TMPDIR && tar -czf $TARBALL $FILES) | 
 | 21 | cp -f $TMPDIR/$TARBALL ./$TARBALL | 
 | 22 | echo "look at $TARBALL" |