core: implement per unit journal rate limiting

System Internals / systemd - Anita Zhang [gmail.com] - 18 October 2018 07:56 EDT

Add LogRateLimitIntervalSec= and LogRateLimitBurst= options for services. If provided, these values get passed to the journald client context, and those values are used in the rate limiting function in the journal over the the journald.conf values.

Part of #10230

90fc172e1 core: implement per unit journal rate limiting
catalog/systemd.catalog.in | 3 +-
docs/TRANSIENT-SETTINGS.md | 2 +
man/journald.conf.xml | 8 ++-
man/systemd.exec.xml | 16 +++++
src/core/dbus-execute.c | 8 +++
src/core/execute.c | 14 +++++
src/core/execute.h | 3 +
src/core/load-fragment-gperf.gperf.m4 | 2 +
src/core/unit.c | 92 +++++++++++++++++++++++++++++
src/core/unit.h | 2 +
src/journal/journald-context.c | 51 +++++++++++++++-
src/journal/journald-context.h | 3 +
src/journal/journald-rate-limit.c | 38 ++++++------
src/journal/journald-rate-limit.h | 4 +-
src/journal/journald-server.c | 4 +-
src/shared/bus-unit-util.c | 8 +++
test/fuzz/fuzz-unit-file/directives.service | 2 +
17 files changed, 232 insertions(+), 28 deletions(-)

Upstream: github.com


  • Share