blob: 3e34ebcae79b523a4b7a4f6c557661b0499917a2 [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Collects boot data and optionally creates a chart"
author "chromium-os-dev@chromium.org"
start on startup
stop on started system-services
env BC_RUN=/dev/.bootchart
env BC_LOG=/var/log/bootchart
pre-start exec mkdir -p "$BC_RUN"
exec /lib/bootchart/collector 25 "$BC_RUN"
pre-stop exec sleep 10
post-stop script
BC_DATA="${BC_LOG}/boot-$(date +%Y%m%d-%H%M%S).tgz"
mkdir -p "$BC_LOG"
/lib/bootchart/gather "$BC_DATA" "$BC_RUN"
rm -rf "$BC_RUN"
end script