blob: d6082aaadd1c0337ea9c1c6e1b04b0874b57f67e [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001#!/bin/sh
2#
Elliott Hughes7c0c15f2015-03-06 13:25:32 -08003# This script is used to retrieve a bootchart log generated by init.
Mark Salyzynd4e5c322015-02-24 08:28:07 -08004# All options are passed to adb, for better or for worse.
Elliott Hughes7c0c15f2015-03-06 13:25:32 -08005# See the readme in this directory for more on bootcharting.
6
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08007TMPDIR=/tmp/android-bootchart
8rm -rf $TMPDIR
9mkdir -p $TMPDIR
10
11LOGROOT=/data/bootchart
12TARBALL=bootchart.tgz
13
14FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct"
15
16for f in $FILES; do
Mark Salyzynd4e5c322015-02-24 08:28:07 -080017 adb "${@}" pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080018done
19(cd $TMPDIR && tar -czf $TARBALL $FILES)
Mark Salyzynd4e5c322015-02-24 08:28:07 -080020bootchart ${TMPDIR}/${TARBALL}
21gnome-open ${TARBALL%.tgz}.png
Elliott Hughes7c0c15f2015-03-06 13:25:32 -080022echo "Clean up ${TMPDIR}/ and ./${TARBALL%.tgz}.png when done"