core: implement per unit journal rate limiting

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
This commit is contained in:
Anita Zhang
2018-10-18 09:56:20 +02:00
committed by Lennart Poettering
parent 9fcdab9c87
commit 90fc172e19
17 changed files with 232 additions and 28 deletions
+3
View File
@@ -225,6 +225,9 @@ struct ExecContext {
struct iovec* log_extra_fields;
size_t n_log_extra_fields;
usec_t log_rate_limit_interval_usec;
unsigned log_rate_limit_burst;
bool cpu_sched_reset_on_fork;
bool non_blocking;
bool private_tmp;