| # Copyright 2017 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 "Report full /var reclamation to UMA" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started system-services |
| |
| script |
| # Reclamation file is written by chromeos_startup if /var got full and |
| # had to be reclaimed. |
| reclamation_file="/mnt/stateful_partition/.reclaim_full_var" |
| |
| # If the file is present, we need to notify UMA. |
| if [ -f "${reclamation_file}" ]; then |
| metrics_client -s "Startup.ReclaimFullVar" 1 |
| |
| # Remove reclamation file to prevent duplicate reports. |
| rm -f "${reclamation_file}" |
| fi |
| end script |