Near last resort kill logcatd, set /proc/self/oom_score_adj to -600.
Can kill to keep system_server, telephony and bluetooth.
Test: manual, start logpersist, runs
Bug: 62147352
Change-Id: I3723761bf1d2b79ce6a9557d2e78f91cc5497e96
logcatd is the same as logcat, except that the -L flag, if supplied,
runs once, then the command re-runs itself without the -L flag with
the same argument set. By introducing a logcatd daemon executable
we can solve the problem of the longish reads from pstore that
sometimes occur when the system is excessively busy, starving this
background cgroup daemon as we absorb the delay in a backgrounded
init "service", rather than in a forgrounded init "exec". This would
not have been efficiently possible without the introduction of
liblogcat.
There are no doubt many flags that make no sense to run twice with,
and without, the -L flag. In the general sense we expect the caller
to perform the correct set of operations and not pick these nonsense
operations. logcatd is only supplied on engineering and debug builds
for logpersist, and is only an automated aid to triage.
Test: gTest logcat-unit-tests
Test: manual confirm logpersist functions as expected, required reboot
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 35326290
Change-Id: I53ba31970749daf37eef42636f039f485932416f
If a new build lands, this will automatically clear out old
logs in /data/misc/logd/ that may no longer be relevant.
Bug: 30591615
Change-Id: Iecf61bb2a4928ce4b2e8cc6a3b122b7ae598d268
(cherry pick from 2591d483c8)
Best practices so that device can set logd.logpersistd properties.
Values can be overriden with trampolines for persist.logd.logpersistd
values except as designed for empty content to keep out of the way.
This allows us to set logd.logpersistd* for a non-persistent collection
that does not survive a reboot, and to use persist.logd.logpersistd*
for persistent collection that does survive a reboot.
Added logd.logpersistd.enable to gate when logpersist service can be
run allowing the properties to be adjusted safely prior to this state
as is the case for device property.
NB: /init will complain when trying to trampoline an empty property,
this is acceptable for functionality, but may be considered
annoying from the logging perspective.
Bug: 28788401
Bug: 28813587
Bug: 28936216
Bug: 29831823
Change-Id: I97317e8eedfae4daa8e3ef39e64e7c5c23d8b573
- Add hidden -n and -b flags that propagate to the underlying
logcat command. Publish aliases in help as --size and --buffer.
- Add --clear for start command so it clears before starting
- shell script bloating up to deal with option validation and
provide ERROR: and WARNING: advice.
ToDo:
- Deprecate shell script and replace with Eng and Userdebug
only Developer Options, before it becomes too powerful
or bloated to force us to rewrite an expendable like this
into C++.
Bug: 28120456
Bug: 28788401
Change-Id: I0dff8acaa1e5c929454760cfa2801924956bc25d
Best practices so that device can set logd.logpersistd properties.
Values can be overriden with trampolines for persist.logd.logpersistd
values except as designed for empty content to keep out of the way.
This allows us to set logd.logpersistd* for a non-persistent collection
that does not survive a reboot, and to use persist.logd.logpersistd*
for persistent collection that does survive a reboot.
Added logd.logpersistd.enable to gate when logpersist service can be
run allowing the properties to be adjusted safely prior to this state
as is the case for device property.
NB: /init will complain when trying to trampoline an empty property,
this is acceptable for functionality, but may be considered
annoying from the logging perspective.
Bug: 28936216
Bug: 29831823
Change-Id: I97317e8eedfae4daa8e3ef39e64e7c5c23d8b573
- add stop and clear (and stop) actions to logcatd.rc
- use stop and clear actions in logpersist script
Bug: 28936216
Change-Id: Id05118fb51e40609fd7b3a934cf9302f67ef6d1d
- Add hidden -n and -b flags that propagate to the underlying
logcat command. Publish aliases in help as --size and --buffer.
- Add --clear for start command so it clears before starting
- shell script bloating up to deal with option validation and
provide ERROR: and WARNING: advice.
ToDo:
- Deprecate shell script and replace with Eng and Userdebug
only Developer Options, before it becomes too powerful
or bloated to force us to rewrite an expendable like this
into C++.
Bug: 28120456
Change-Id: I0dff8acaa1e5c929454760cfa2801924956bc25d