blob: c6a54244702012666b9077ecbe44d60ab1fd5eb3 [file] [log] [blame] [edit]
# Copyright 2014 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Report the EC being in TPSRESET state"
author "chromium-os-dev@chromium.org"
oom score -100
start on started system-services
script
# Check if the EC is in TPSRESET state and if so report it, but only once
# (by design, the EC stays in that state forever).
EC_RESET_FILE=/home/chronos/.ec.tpsreset
if ectool chipinfo | grep -q TPSRESET &&
test ! -f $EC_RESET_FILE
then
metrics_client -v Ec.TpsReset
su chronos -c "touch $EC_RESET_FILE"
fi
end script