blob: af69acd9fd755496202dd69c8feafef1f75aac1b [file] [log] [blame]
# Copyright 2020 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 "Log temperature from internal sensors every minute"
author "chromium-os-dev@chromium.org"
start on started system-services
stop on stopping system-services
respawn
respawn limit 3 10 # if the job respawns 3 times in 10 seconds, stop trying.
# Allow us to be killed as we are not critical to the system.
oom score -100
# Let the process crash if it grows too much. "as" for "address space".
# Currently it uses about 6.5 MB (by checking /proc/$PID/status).
limit as 50000000 unlimited
# Run the script in minijail minimalistic-mountns profile.
# -b /dev/log for logger
# -b /sys for /sys/class/thermal and /sys/class/powercap
exec minijail0 \
-u power \
--profile=minimalistic-mountns \
--uts \
-e \
-l \
-p \
-b /dev/log \
-b /sys \
-- /usr/share/cros/init/temp_logger.sh