blob: d426784caa384b6f8b4ce67229ecdabfcb3d96ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
base="$(hostname -s)-$(lsb_release -sc)-$(date +%Y%m%d)"
# Wait for log files to become available
sleep 60
file=`find /var/log/bootchart/ -name "$base-*.tgz"`
if [ -z "$file" ]; then
sleep 60
fi
file=`find /var/log/bootchart/ -name "$base-*.tgz"`
if [ -z "$file" ]; then
echo "No bootchart log file available"
exit 1
fi
count=1
while [ -e "/var/log/bootchart/$base-$count.tgz" -o -e "/var/log/bootchart/$base-$count.png" -o -e "/var/log/bootchart/$base-$count.svg" ]
do
count=$(( $count + 1 ))
done
count=$(( $count - 1 ))
BASE="/var/log/bootchart/$base-$count"
TARBALL="$BASE.tgz"
python $PWD/bootcharttest.py $TARBALL -q > bootchart.log
|